mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2024-12-23 17:34:19 +03:00
fix #4358: destroy_vm: Ignore 'suspended' lock when destroying VM
Since we can now differentiate between 'suspended' and 'suspending', it is possible to ignore the 'suspended' lock when destroying a VM. It shouldn't matter whether the VM is locked because of hibernation when you want to remove it. Therefore we can safely ignore the lock.
This commit is contained in:
parent
b3a3e92962
commit
30fdf99cff
@ -2341,7 +2341,9 @@ sub destroy_vm {
|
||||
|
||||
my $conf = PVE::QemuConfig->load_config($vmid);
|
||||
|
||||
PVE::QemuConfig->check_lock($conf) if !$skiplock;
|
||||
if (!$skiplock && !PVE::QemuConfig->has_lock($conf, 'suspended')) {
|
||||
PVE::QemuConfig->check_lock($conf);
|
||||
}
|
||||
|
||||
if ($conf->{template}) {
|
||||
# check if any base image is still used by a linked clone
|
||||
|
Loading…
Reference in New Issue
Block a user