mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
* F #5326 Enabled delete system snapshots for a power-off vcenter-VM * Update exit condition
This commit is contained in:
parent
0b36571b23
commit
85ce992f2a
@ -1519,8 +1519,8 @@ int DispatchManager::snapshot_delete(int vid, int snap_id,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ( vm->get_state() != VirtualMachine::ACTIVE ||
|
||||
vm->get_lcm_state() != VirtualMachine::RUNNING )
|
||||
if ( (vm->get_state() != VirtualMachine::ACTIVE || vm->get_lcm_state() != VirtualMachine::RUNNING) ||
|
||||
(!vmm->is_keep_snapshots(vm->get_vmm_mad()) && vm->get_state() == VirtualMachine::POWEROFF) )
|
||||
{
|
||||
oss << "Could not delete snapshot " << snap_id << " for VM " << vid
|
||||
<< ", wrong state " << vm->state_str() << ".";
|
||||
|
Loading…
x
Reference in New Issue
Block a user