[pve-devel] [PATCH qemu-server master+stable-bookworm 1/1] fix #6934: vm start: don't apply pending changes when resuming from hibernation
Fiona Ebner
f.ebner at proxmox.com
Wed Oct 29 11:53:07 CET 2025
When loading the VM state during resume from hibernation, it is
essential that the QEMU commandline of the new instance matches the
one from the instance the VM state was created with. Thus, pending
changes cannot be applied.
Checking for hibernation was missing in the logic checking whether
pending changes should be applied. In particular, the $statefile
parameter is not used when resuming after hibernation. There, the
$resume parameter is set and the state file/volume is found in the
'vmstate' configuraiton option.
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
src/PVE/QemuServer.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index cf195ccc..c54a49ee 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -5454,7 +5454,7 @@ sub vm_start_nolock {
eval { clear_reboot_request($vmid); };
warn $@ if $@;
- if (!$statefile && scalar(keys %{ $conf->{pending} })) {
+ if (!$statefile && !$resume && scalar(keys %{ $conf->{pending} })) {
vmconfig_apply_pending($vmid, $conf, $storecfg);
$conf = PVE::QemuConfig->load_config($vmid); # update/reload
}
--
2.47.3
More information about the pve-devel
mailing list