mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
CA-189674: Move VM shows an irrelevant (VIF mapping) error, but it shouldn't
I assumed the problem was that vm.resident_on is always unknown for stopped vms, but this is there intentionally to match only running vms and be always false for stopped ones. However, we still need similar logic to not to send VIF mapping when not needed in the assert. Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
This commit is contained in:
parent
3df22f4735
commit
a8ea4d47be
@ -96,7 +96,7 @@ namespace XenAdmin.Wizards.CrossPoolMigrateWizard.Filters
|
||||
{
|
||||
//Skip the resident host as there's a filter for it and
|
||||
//if not then you could exclude intrapool migration
|
||||
if (vm.Connection == host.Connection)
|
||||
if (vm.resident_on == host.opaque_ref)
|
||||
continue;
|
||||
|
||||
PIF managementPif = host.Connection.Cache.PIFs.First(p => p.management);
|
||||
@ -109,7 +109,7 @@ namespace XenAdmin.Wizards.CrossPoolMigrateWizard.Filters
|
||||
receiveMapping,
|
||||
true,
|
||||
GetVdiMap(vm, targetSR),
|
||||
GetVifMap(vm, targetNetwork),
|
||||
vm.Connection == host.Connection ? new Dictionary<XenRef<VIF>, XenRef<XenAPI.Network>>() : GetVifMap(vm, targetNetwork),
|
||||
new Dictionary<string, string>());
|
||||
}
|
||||
catch (Failure failure)
|
||||
|
@ -54,7 +54,7 @@ namespace XenAdmin.Wizards.CrossPoolMigrateWizard.Filters
|
||||
get
|
||||
{
|
||||
List<Host> residentHosts = new List<Host>();
|
||||
preSelectedVMs.ForEach(vm=>residentHosts.Add(vm.Home()));
|
||||
preSelectedVMs.ForEach(vm=>residentHosts.Add( vm.Connection.Resolve(vm.resident_on)));
|
||||
|
||||
if(ItemToFilterOn is Host)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user