mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
parent
3a1aa0c855
commit
ea33ca4c77
@ -211,6 +211,8 @@ void DispatchManager::poweroff_success_action(int vid)
|
||||
return;
|
||||
}
|
||||
|
||||
VirtualMachine::LcmState prev_state = vm->get_lcm_state();
|
||||
|
||||
if ((vm->get_state() == VirtualMachine::ACTIVE) &&
|
||||
(vm->get_lcm_state() == VirtualMachine::SHUTDOWN_POWEROFF ||
|
||||
vm->get_lcm_state() == VirtualMachine::HOTPLUG_PROLOG_POWEROFF ||
|
||||
@ -247,7 +249,12 @@ void DispatchManager::poweroff_success_action(int vid)
|
||||
|
||||
vm->unlock();
|
||||
|
||||
Quotas::vm_del(uid, gid, "a_tmpl);
|
||||
if (prev_state != VirtualMachine::DISK_SNAPSHOT_POWEROFF &&
|
||||
prev_state != VirtualMachine::DISK_SNAPSHOT_REVERT_POWEROFF &&
|
||||
prev_state != VirtualMachine::DISK_SNAPSHOT_DELETE_POWEROFF)
|
||||
{
|
||||
Quotas::vm_del(uid, gid, "a_tmpl);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user