mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
CA-227272: Ignore unresolved VDIs first, then check if the storage mapping contains
the resolved ones and then try getting the target SR from the mapping. Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
8b9985f894
commit
c7994c286d
@ -109,10 +109,15 @@ namespace XenAdmin.Actions.VMActions
|
||||
if (!oldVBD.IsOwner)
|
||||
continue;
|
||||
|
||||
SR sr = StorageMapping != null ? StorageMapping[oldVBD.VDI.opaque_ref] : null;
|
||||
|
||||
var curVdi = Connection.Resolve(oldVBD.VDI);
|
||||
if (curVdi == null || sr == null || curVdi.SR.opaque_ref == sr.opaque_ref)
|
||||
if (curVdi == null)
|
||||
continue;
|
||||
|
||||
if (StorageMapping == null || !StorageMapping.ContainsKey(oldVBD.VDI.opaque_ref))
|
||||
continue;
|
||||
|
||||
SR sr = StorageMapping[oldVBD.VDI.opaque_ref];
|
||||
if (sr == null || curVdi.SR.opaque_ref == sr.opaque_ref)
|
||||
continue;
|
||||
|
||||
RelatedTask = XenAPI.VDI.async_copy(Session, oldVBD.VDI.opaque_ref, sr.opaque_ref);
|
||||
|
Loading…
Reference in New Issue
Block a user