mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-24 22:06:59 +01:00
CA-365717: Two corrections on VM import (from XVA):
- Do not suppress failures when polling the import task. - When the imported VM is suspended, try resuming instead of starting it. Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
f5672a8645
commit
51a400bf70
@ -215,7 +215,12 @@ namespace XenAdmin.Actions
|
||||
Description = isTemplate ? Messages.IMPORT_TEMPLATE_IMPORTCOMPLETE : Messages.IMPORTVM_IMPORTCOMPLETE;
|
||||
|
||||
if (vm != null && !vm.is_a_template && m_startAutomatically)
|
||||
new VMStartAction(vm, _warningDelegate, _failureDiagnosisDelegate).RunAsync();
|
||||
{
|
||||
if (vm.power_state == vm_power_state.Suspended)
|
||||
new VMResumeAction(vm, _warningDelegate, _failureDiagnosisDelegate).RunAsync();
|
||||
else
|
||||
new VMStartAction(vm, _warningDelegate, _failureDiagnosisDelegate).RunAsync();
|
||||
}
|
||||
}
|
||||
|
||||
private int VMsWithName(string name)
|
||||
@ -283,7 +288,7 @@ namespace XenAdmin.Actions
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
PollToCompletion(suppressFailures: true);
|
||||
PollToCompletion();
|
||||
if (e is CancelledException || e is HTTP.CancelledException || e.InnerException is CancelledException)
|
||||
throw new CancelledException();
|
||||
throw;
|
||||
|
Loading…
Reference in New Issue
Block a user