mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 20:36:33 +01:00
Fixed failure to start a VM after it was imported as an XVA package.
Regression introduced by the changes for CA-64500. Since we initiate a VMStartAction we need to ensure that the VM object passed to the action has a non-null Connection. Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
0b0d6973ba
commit
542a329a27
@ -231,13 +231,10 @@ namespace XenAdmin.Actions
|
||||
}
|
||||
}
|
||||
|
||||
//get the record before marking the action as completed
|
||||
var vm = VM.get_record(Session, vmRef);
|
||||
vm.opaque_ref = vmRef;
|
||||
|
||||
var vm = Connection.WaitForCache(new XenRef<VM>(vmRef));
|
||||
Description = isTemplate ? Messages.IMPORT_TEMPLATE_IMPORTCOMPLETE : Messages.IMPORTVM_IMPORTCOMPLETE;
|
||||
|
||||
if (!vm.is_a_template && m_startAutomatically)
|
||||
if (vm != null && !vm.is_a_template && m_startAutomatically)
|
||||
new VMStartAction(vm, _warningDelegate, _failureDiagnosisDelegate).RunAsync();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user