5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-24 02:04:10 +03:00

Fix ACPI-suspended VMs resuming after migration

Add checks for "suspended" and "prelaunch" runstates when checking
whether a VM is paused.

This fixes the following issues:
* ACPI-suspended VMs automatically resuming after migration
* Shutdown and reboot commands timing out instead of failing
  immediately on suspended VMs

Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
This commit is contained in:
Filip Schauer 2023-10-09 15:25:19 +02:00 committed by Fiona Ebner
parent 95f1de689e
commit 7ba974a682

View File

@ -8503,7 +8503,11 @@ sub vm_is_paused {
mon_cmd($vmid, "query-status");
};
warn "$@\n" if $@;
return $qmpstatus && $qmpstatus->{status} eq "paused";
return $qmpstatus && (
$qmpstatus->{status} eq "paused" ||
$qmpstatus->{status} eq "suspended" ||
$qmpstatus->{status} eq "prelaunch"
);
}
sub check_volume_storage_type {