public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server master+stable-bookworm 0/1] fix #6934: vm start: don't apply pending changes when resuming from hibernation
@ 2025-10-29 10:53 Fiona Ebner
  2025-10-29 10:53 ` [pve-devel] [PATCH qemu-server master+stable-bookworm 1/1] " Fiona Ebner
  0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2025-10-29 10:53 UTC (permalink / raw)
  To: pve-devel

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.

qemu-server:

Fiona Ebner (1):
  fix #6934: vm start: don't apply pending changes when resuming from
    hibernation

 src/PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Summary over all repositories:
  1 files changed, 1 insertions(+), 1 deletions(-)

-- 
Generated by git-murpp 0.5.0


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] [PATCH qemu-server master+stable-bookworm 1/1] fix #6934: vm start: don't apply pending changes when resuming from hibernation
  2025-10-29 10:53 [pve-devel] [PATCH qemu-server master+stable-bookworm 0/1] fix #6934: vm start: don't apply pending changes when resuming from hibernation Fiona Ebner
@ 2025-10-29 10:53 ` Fiona Ebner
  0 siblings, 0 replies; 2+ messages in thread
From: Fiona Ebner @ 2025-10-29 10:53 UTC (permalink / raw)
  To: pve-devel

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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-29 10:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-29 10:53 [pve-devel] [PATCH qemu-server master+stable-bookworm 0/1] fix #6934: vm start: don't apply pending changes when resuming from hibernation Fiona Ebner
2025-10-29 10:53 ` [pve-devel] [PATCH qemu-server master+stable-bookworm 1/1] " Fiona Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal