1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-10 01:17:40 +03:00

B #5800: Fix imported VMs after failure (#2150)

(cherry picked from commit b02e28fb51)
This commit is contained in:
Pavel Czerný 2022-06-20 19:58:04 +02:00 committed by Ruben S. Montero
parent 34c1d4345c
commit 44148d9600
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -2085,14 +2085,20 @@ string VirtualMachine::get_import_state() const
bool VirtualMachine::is_imported_action_supported(VMActions::Action action) const
{
if (!hasHistory())
string vmm_mad;
if (hasHistory())
{
return false;
vmm_mad = get_vmm_mad();
}
else
{
user_obj_template->get("HYPERVISOR", vmm_mad);
}
VirtualMachineManager * vmm = Nebula::instance().get_vmm();
return vmm->is_imported_action_supported(get_vmm_mad(), action);
return vmm->is_imported_action_supported(vmm_mad, action);
}
/* -------------------------------------------------------------------------- */