]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
kbase: Add note about preserving VM on shutdown to backup article
authorPeter Krempa <pkrempa@redhat.com>
Wed, 19 Nov 2025 07:49:04 +0000 (08:49 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 24 Nov 2025 15:40:24 +0000 (16:40 +0100)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
docs/kbase/live_full_disk_backup.rst

index be95d9d2e2203e3bceabe1de1a60c6242b10defd..37034eae3673cb33cdef2a3533b230aecc1d3c4f 100644 (file)
@@ -1,3 +1,5 @@
+.. role:: since
+
 ===============================
 Efficient live full disk backup
 ===============================
@@ -84,6 +86,24 @@ This requires libvirt-7.2.0 and QEMU-4.2, or higher versions.
     15M -rw-r--r--. 1 qemu qemu 15M May 10 12:22 vm1.qcow2
     21M -rw-------. 1 root root 21M May 10 12:23 vm1.qcow2.1620642185
 
+Shutdown of the guest OS during backup
+--------------------------------------
+
+The backup job is a long running job, potentially copying a lot of data, which
+requires the VM to be active (The backup is done by the qemu process) and
+can't be continued if the VM shuts down. This includes shut down initiated by
+the guest OS itself.
+
+:since:`Since libvirt-11.10` the ``virDomainBackupBegin()`` supports the
+``VIR_DOMAIN_BACKUP_BEGIN_PRESERVE_SHUTDOWN_DOMAIN`` flag
+(``virsh backup-begin --preserve-domain-on-shutdown``) which instructs libvirt
+to avoid termination of the VM if the guest OS shuts down while the backup is
+still running. The VM is in that scenario reset and paused instead of terminated
+allowing the backup to finish. Once the backup finishes the VM process is
+terminated. Users can resume the VM (e.g. ``virsh resume``) which causes it
+to boot normally using the existing VM process and will continue to run after
+completion of the backup job.
+
 
 Full backup with older libvirt versions
 =======================================