From nobody Fri Nov 21 10:14:12 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1763545759; cv=none; d=zohomail.com; s=zohoarc; b=aXJ1WP5itf+o1rfA19A74m+XeZCUeYNriDY/PAmVCHPQkbCsdHvgtIX8xlEyEWxV2WIIylgVG6Vda6rAyG+crUUNRv8GwOudNEjX2FbFrCWR0qqhJgf7MZKjoQfOdVNVUQs23lYG9gK3d0XhYnHoH8p9Mi5ClcDJ83Txz3mOLIY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1763545759; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=qZpNB88Ti1zMwuDhA+wKc/PQ6muVBiNZU80piwB9Xj0=; b=FglvVL2iwzAKbYQsS6JYi1dGutpoKFqDBKy1H9MWbDwDxt2tjBiEUXiUA25xW2O4p6rXvlX5oRdtqxD7+LXEIm2ZXINhPjEUamimxkBTxZx1EtpwUhb1uL9HbtQr9oB3aRWPwGgi5wyAQ5tIYNcAHLU9LjiaRLafaDv5okgAGT0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1763545759907514.1633901430396; Wed, 19 Nov 2025 01:49:19 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id DDD6B3F30F; Wed, 19 Nov 2025 04:49:18 -0500 (EST) Received: from [172.19.199.50] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 8894844332; Wed, 19 Nov 2025 04:38:51 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 56F5044274; Wed, 19 Nov 2025 04:38:41 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 6209843FCB for ; Wed, 19 Nov 2025 04:38:07 -0500 (EST) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-475-lZglWAsEPS6tHTV3V_MxcQ-1; Wed, 19 Nov 2025 04:38:05 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A793718AB428 for ; Wed, 19 Nov 2025 09:38:04 +0000 (UTC) Received: from speedmetal.openshiftapps.com (unknown [10.45.242.12]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9D63E18004A3 for ; Wed, 19 Nov 2025 09:38:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763545087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qZpNB88Ti1zMwuDhA+wKc/PQ6muVBiNZU80piwB9Xj0=; b=XApbKN0QStV5Oq646GbXaj2rwSpszACubNcPbBm5efMkBdwDgA/tevPF9XiRDmwHVehOhL zN0FUX6AwcTEyvqn9myKyaodLJvJ9VPoh9+eUZhXXAbMqmLzCCzbnndzZRj4VodKs4a3b8 qN3GyQ10Kw0y4LithaZlhE0I7F/2Nmo= X-MC-Unique: lZglWAsEPS6tHTV3V_MxcQ-1 X-Mimecast-MFC-AGG-ID: lZglWAsEPS6tHTV3V_MxcQ_1763545084 To: devel@lists.libvirt.org Subject: [PATCH 8/8] kbase: Add note about preserving VM on shutdown to backup article Date: Wed, 19 Nov 2025 10:37:51 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: eaucAo7tImWk6hP9azY4fIy40_Zr6QIHB--WboYCquo_1763545084 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: YZYL7QG2X3CF2MRCMOV7WNANS7KJADEW X-Message-ID-Hash: YZYL7QG2X3CF2MRCMOV7WNANS7KJADEW X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1763545760959158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Signed-off-by: Peter Krempa --- docs/kbase/live_full_disk_backup.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/kbase/live_full_disk_backup.rst b/docs/kbase/live_full_di= sk_backup.rst index be95d9d2e2..2b3b19772e 100644 --- a/docs/kbase/live_full_disk_backup.rst +++ b/docs/kbase/live_full_disk_backup.rst @@ -84,6 +84,24 @@ This requires libvirt-7.2.0 and QEMU-4.2, or higher vers= ions. 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, w= hich +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. + +Starting from ``libvirt-11.10`` the ``virDomainBackupBegin()`` supports the +``VIR_DOMAIN_BACKUP_BEGIN_PRESERVE_SHUTDOWN_DOMAIN`` flag +(``virsh backup-begin --preserve-domain-on-shutdown``) which instructs lib= virt +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 term= inated +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 exsiting VM process and will continue to run af= ter +completion of the backup job. + Full backup with older libvirt versions =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 2.51.1