all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server 2/5] snapshot: document how consistency between multiple disks is achieved
Date: Tue, 14 Jul 2026 16:25:58 +0200	[thread overview]
Message-ID: <20260714142629.277917-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260714142629.277917-1-f.ebner@proxmox.com>

Document how the savevm-start and savevm-end QMP handlers affect the
run-state of the VM and the block layer and how consistency between
multiple disks is ensured.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/QemuConfig.pm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/PVE/QemuConfig.pm b/src/PVE/QemuConfig.pm
index 26f0fda2..cadcd9e9 100644
--- a/src/PVE/QemuConfig.pm
+++ b/src/PVE/QemuConfig.pm
@@ -321,6 +321,13 @@ sub __snapshot_create_vol_snapshots_hook {
     if ($running) {
         my $storecfg = PVE::Storage::config();
 
+        # NOTE savevm-start is called even if no state is saved to ensure consistency between
+        # multiple disks. The savevm-start QMP handler does a vm_stop() which drains and flushes all
+        # block devices via QEMU's block layer. If the state is saved, vm_stop() is called when
+        # saving the state converges (right before the status from query-savevm becomes
+        # 'completed'). The savevm-end QMP handler resumes the VM if it was running (and not
+        # paused/suspended/etc.) before.
+
         if ($hook eq "before") {
             if ($snap->{vmstate}) {
                 my $path = PVE::Storage::path($storecfg, $snap->{vmstate});
-- 
2.47.3





  parent reply	other threads:[~2026-07-14 14:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 14:25 [PATCH-SERIES qemu/qemu-server/docs/manager 0/5] vm: snapshot: improve consistency and documentation Fiona Ebner
2026-07-14 14:25 ` [PATCH qemu 1/5] async snapshot: improve disk consistency by only calling vm_start() in savevm-end handler Fiona Ebner
2026-07-14 14:25 ` Fiona Ebner [this message]
2026-07-14 14:25 ` [PATCH docs 3/5] pvesm: add anchor for storage types Fiona Ebner
2026-07-14 14:26 ` [PATCH docs 4/5] qm: document snapshot operations Fiona Ebner
2026-07-14 14:26 ` [PATCH manager 5/5] ui: qemu: online help: link to new section for snapshots Fiona Ebner

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=20260714142629.277917-3-f.ebner@proxmox.com \
    --to=f.ebner@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