5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2024-12-24 21:34:43 +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:
Stefan Hanreich 2023-01-05 15:51:56 +01:00 committed by Thomas Lamprecht
parent b3a3e92962
commit 30fdf99cff

View File

@ -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