From: Filip Schauer <f.schauer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 qemu-server 1/2] Add missing checks for paused runstates
Date: Fri, 25 Aug 2023 14:18:50 +0200 [thread overview]
Message-ID: <20230825121851.103307-2-f.schauer@proxmox.com> (raw)
In-Reply-To: <20230825121851.103307-1-f.schauer@proxmox.com>
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>
---
PVE/QemuServer.pm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index bf1de17..954fed7 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -8596,7 +8596,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" or
+ $qmpstatus->{status} eq "suspended" or
+ $qmpstatus->{status} eq "prelaunch"
+ );
}
sub check_volume_storage_type {
--
2.39.2
next prev parent reply other threads:[~2023-08-25 12:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-25 12:18 [pve-devel] [PATCH v2 qemu-server 0/2] Fix ACPI-suspended VMs resuming after migration Filip Schauer
2023-08-25 12:18 ` Filip Schauer [this message]
2023-10-09 11:11 ` [pve-devel] [PATCH v2 qemu-server 1/2] Add missing checks for paused runstates Fiona Ebner
2023-08-25 12:18 ` [pve-devel] [PATCH v2 qemu-server 2/2] Rename vm_is_paused to vm_is_frozen Filip Schauer
2023-10-09 11:11 ` Fiona Ebner
2023-10-09 13:27 ` [pve-devel] [PATCH v2 qemu-server 0/2] Fix ACPI-suspended VMs resuming after migration Filip Schauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230825121851.103307-2-f.schauer@proxmox.com \
--to=f.schauer@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal