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 docs 4/5] qm: document snapshot operations
Date: Tue, 14 Jul 2026 16:26:00 +0200	[thread overview]
Message-ID: <20260714142629.277917-5-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260714142629.277917-1-f.ebner@proxmox.com>

Add a common intro for snapshots and hibernation to describe the
differences and commonalities.

Document why snapshots with multiple disks are consistent. There
already is a 'qm_snapshots' anchor, but that is a subsection for the
configuration chapter, so use 'qm_snapshot_operations' for the new
one.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 qm.adoc | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 67 insertions(+), 4 deletions(-)

diff --git a/qm.adoc b/qm.adoc
index 93372c5..003cdc6 100644
--- a/qm.adoc
+++ b/qm.adoc
@@ -2127,9 +2127,67 @@ It will be called during various phases of the guests lifetime.
 For an example and documentation see the example script under
 `/usr/share/pve-docs/examples/guest-example-hookscript.pl`.
 
+[[qm_snapshots_and_hibernation]]
+Snapshots and Hibernation
+-------------------------
+
+You can use snapshots and hibernation to preserve the current state of the VM
+configuration, disks, device state and RAM. Hibernation stops and locks the VM
+and you can resume the VM from the saved state later. Snapshots allow the VM to
+continue running and being modified normally and you can rollback to a snapshot
+at any later time. Passing through host devices to the VM and certain other
+configuration settings might make preserving the state impossible and thus block
+snapshots and hibernation. Certain storages like RBD allow arbitrary snapshot
+trees, other storages like ZFS only allow linear snapshot chains and rollback to
+the latest snapshot. Check the list of xref:_storage_types[Storage Types]
+for snapshots support.
+
+[[qm_snapshot_operations]]
+Snapshots
+~~~~~~~~~
+
+Create a new snapshot of the current configuration and disk state with:
+
+----
+# qm snapshot ID SNAPSHOT_NAME
+----
+
+For a running VM, you may additionally include the device state and RAM with:
+
+----
+# qm snapshot ID SNAPSHOT_NAME --vmstate 1
+----
+
+This creates a new volume on the xref:qm_vmstatestorage[state storage] and
+allows to restore the live state of the VM upon rollback.
+
+NOTE: Proxmox VE ensures consistency between multiple disks by pausing the vCPUs
+and completing and flushing all pending IO via the QEMU block layer before the
+disk snapshots are created.
+
+Delete a snapshot with:
+
+----
+# qm delsnapshot ID SNAPSHOT_NAME
+----
+
+Roll back to a snapshot with:
+
+----
+# qm rollback ID SNAPSHOT_NAME
+----
+
+WARNING: Rollback destroys the current state of the VM (even if running) and
+disks!
+
+The VM configuration and the state of the VM disks are changed back to the point
+in time when the snapshot was taken. If the VM state is included in the
+snapshot, the VM is live after rollback and continues running from the point
+in time when the snapshot was taken.
+
 [[qm_hibernate]]
 Hibernation
------------
+~~~~~~~~~~~
 
 You can suspend a VM to disk with the GUI option `Hibernate` or with
 
@@ -2142,9 +2200,14 @@ and the VM gets stopped. On the next start, the memory content will be
 loaded and the VM can continue where it was left off.
 
 [[qm_vmstatestorage]]
-.State storage selection
-If no target storage for the memory is given, it will be automatically
-chosen, the first of:
+State storage selection
+~~~~~~~~~~~~~~~~~~~~~~~
+
+To the save the RAM and device state of the virtual machine, a separate volume
+is created. For hibernation, use the `--statestorage` option to specify the
+target storage for the state volume. For snapshots or if not provided for
+hibernation, the target storage for the state volume is automatically chosen,
+the first of:
 
 1. The storage `vmstatestorage` from the VM config.
 2. The first shared storage from any VM disk.
-- 
2.47.3





  parent reply	other threads:[~2026-07-14 14:27 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 ` [PATCH qemu-server 2/5] snapshot: document how consistency between multiple disks is achieved Fiona Ebner
2026-07-14 14:25 ` [PATCH docs 3/5] pvesm: add anchor for storage types Fiona Ebner
2026-07-14 14:26 ` Fiona Ebner [this message]
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-5-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