From nobody Tue Feb 10 07:41:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1647016725; cv=none; d=zohomail.com; s=zohoarc; b=TmCQy7/tUd7gDJFZtZh8Dx6/YPd0Q+WREYWNfo+eN0E/I2C00ozwMAG5tboAbjnVVQOKHtspk6/Rrh3NIeNek6gHb939/0juJBL9pmFpS0ctQPRhghwa4AaCnYJbpp5b/bX8Ze0Q7AUoj0FIaYo1yCe6Pcz62R/opUYMUt1NFC8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1647016725; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0LjboBL1bbAEbfaLPVxyo+bE36/7ijJPIQoE3gbNRTo=; b=VJ6ooAQ2Pum7/j4vsnBXlgNZAbATdTERA4JFw50SAGtm7zyhrkJ8tHSPTwcWW3r2UEfwRolE/J9nipdOAW4Maz2j5u1I+Om5+SD7lEc+zYFFygPVr1f7NnihExVwKyzIBgyyhcnVOQzqXptkxH2qgXN3BIYJnBWstnr0uS0JBAs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1647016725472336.1926574312115; Fri, 11 Mar 2022 08:38:45 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-32-6kTXKmb8NiKkv6H3U-T9Fg-1; Fri, 11 Mar 2022 11:38:42 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5251B10726A5; Fri, 11 Mar 2022 16:38:40 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3CAE51457F06; Fri, 11 Mar 2022 16:38:40 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D88BF1953556; Fri, 11 Mar 2022 16:38:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 81D9E1954385 for ; Fri, 11 Mar 2022 16:38:38 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0DEEC7BCCF; Fri, 11 Mar 2022 16:38:38 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 675257BCCC for ; Fri, 11 Mar 2022 16:38:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647016724; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=0LjboBL1bbAEbfaLPVxyo+bE36/7ijJPIQoE3gbNRTo=; b=cRp3ZwPrHtinJP1ec+4L+sEwBDsmfE8qro1LxTFzx7JnYqHxY1ODgyY1utHmhw9IgSzz7j 8WaJfG9+4jslNYYqQF3xdQYZPrex7q08R4SD8/VROof3S1I4NNrBL/0csMxoae0p1R9deC 7vHgJVLTwQJj4RZ9PMUMFGQ84FbpJrg= X-MC-Unique: 6kTXKmb8NiKkv6H3U-T9Fg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/3] kbase: Introduce 'snapshots' page and describe the new 'manual' snapshot Date: Fri, 11 Mar 2022 17:38:32 +0100 Message-Id: <0552ad3412905cefda34f62ce0fd036986738856.1647016672.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1647016726693100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa --- docs/kbase/index.rst | 3 +++ docs/kbase/meson.build | 1 + docs/kbase/snapshots.rst | 53 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 docs/kbase/snapshots.rst diff --git a/docs/kbase/index.rst b/docs/kbase/index.rst index 09b19ed1af..77b23e96a8 100644 --- a/docs/kbase/index.rst +++ b/docs/kbase/index.rst @@ -55,6 +55,9 @@ Usage `Memory devices `__ Memory devices and their use +`Snapshots ` + Details about snapshotting a VM + Internals / Debugging --------------------- diff --git a/docs/kbase/meson.build b/docs/kbase/meson.build index af067db453..d632f9bda1 100644 --- a/docs/kbase/meson.build +++ b/docs/kbase/meson.build @@ -18,6 +18,7 @@ docs_kbase_files =3D [ 'rpm-deployment', 's390_protected_virt', 'secureusage', + 'snapshots', 'systemtap', 'virtiofs', ] diff --git a/docs/kbase/snapshots.rst b/docs/kbase/snapshots.rst new file mode 100644 index 0000000000..bc457197a0 --- /dev/null +++ b/docs/kbase/snapshots.rst @@ -0,0 +1,53 @@ +=3D=3D=3D=3D=3D=3D=3D=3D=3D +Snapshots +=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. contents:: + +Manual storage snapshotting +=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 + +Certain use cases such as block storage on LVM or disks backed via storage +exported through the ``vhost-user-blk`` protocol may require that snapshot= s are +done in conjunction with the storage provider which is not managed by **li= bvirt**. + +To achieve this such disks can use ``snapshot`` mode ``manual``. When a sn= apshot +has a disk in manual mode the following happens: + + #. ``libvirt`` takes snapshot of the VM memory if requested + + #. If a live snapshot is requested (``VIR_DOMAIN_SNAPSHOT_CREATE_LIVE``= ) the + VM runs until the memory snapshot phase completes and is then paused. + #. Otherwise the VM is paused right away. + + #. Snapshot of disks which are marked for external snapsot is executed + #. The API return success, the VM is paused. + #. The user snapshots the externally managed storage + #. The user resumes the execution of the VM (``virsh resume $VM``) + +*Note:* It's not required to wait until the API finishes. The snapshotting= of +``manual`` disks can be done right after a event of +``VIR_DOMAIN_EVENT_ID_LIFECYCLE`` type with value of +``VIR_DOMAIN_EVENT_SUSPENDED`` is emitted by libvirtd. + +Overview of manual snapshots +---------------------------- + +Manual snapshot of a disk is requested by setting the ``snapshot`` propert= y to +``manual`` in the snapshot XML :: + + + + + + + + + + +or ``--diskspec vda,snapshot=3Dmanual`` when using ``virsh snapshot-create= -as``:: + + $ virsh snapshot-create-as --diskspec vda,snapshot=3Dmanual \ + --diskspec vdb,snapshot=3Dexternal \ + --diskspec vdc,snapshot=3Dno $VM \ + --memspec file=3D/path/to/memory/img --=20 2.35.1