]> xenbits.xensource.com Git - libvirt.git/commitdiff
capabilities: report full external snapshot support
authorPavel Hrdina <phrdina@redhat.com>
Thu, 24 Aug 2023 16:19:52 +0000 (18:19 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 9 Oct 2023 13:06:59 +0000 (15:06 +0200)
Now that deleting and reverting external snapshots is implemented we can
report that in capabilities so management applications can use that
information and start using external snapshots.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
14 files changed:
docs/formatcaps.rst
src/conf/capabilities.c
src/conf/capabilities.h
src/conf/schemas/capability.rng
src/qemu/qemu_capabilities.c
tests/qemucaps2xmloutdata/caps.aarch64+hvf.xml
tests/qemucaps2xmloutdata/caps.aarch64.xml
tests/qemucaps2xmloutdata/caps.ppc.xml
tests/qemucaps2xmloutdata/caps.ppc64.xml
tests/qemucaps2xmloutdata/caps.riscv64.xml
tests/qemucaps2xmloutdata/caps.s390x.xml
tests/qemucaps2xmloutdata/caps.sparc.xml
tests/qemucaps2xmloutdata/caps.x86_64+hvf.xml
tests/qemucaps2xmloutdata/caps.x86_64.xml

index bb8bc663d2e5676be3299325d10685eec767faea..3cccf70882655473172282e8457d034b8391a9ae 100644 (file)
@@ -134,6 +134,12 @@ The ``<guest/>`` element will typically wrap up the following elements:
       creating external disk snapshots is supported. If absent, creating external
       snapshots may still be supported, but it requires attempting the API and
       checking for an error to find out for sure. :since:`Since 1.2.3`
+   ``externalSnapshot``
+      If this element is present, the hypervisor supports deleting and
+      reverting external snapshots including memory state. Support for creation
+      of external snapshots is reported via the ``disksnapshot`` feature flag.
+      Management applications can now switch from internal snapshots to external
+      snapshots. :since:`Since 9.9.0`
 
 Examples
 ~~~~~~~~
@@ -318,6 +324,7 @@ capabilities enabled in the chip and BIOS you will see:
         <cpuselection/>
         <deviceboot/>
         <disksnapshot default='on' toggle='no'/>
+        <externalSnapshot/>
       </features>
     </guest>
 
index 56768ce6e0d86dec8b9bac4e9ba9d5a20ef4550e..34f04cb7d3ed8dfbb5aa6801eb928d71f94f782c 100644 (file)
@@ -508,6 +508,7 @@ static const struct virCapsGuestFeatureInfo virCapsGuestFeatureInfos[VIR_CAPS_GU
     [VIR_CAPS_GUEST_FEATURE_TYPE_DEVICEBOOT] = { "deviceboot", false },
     [VIR_CAPS_GUEST_FEATURE_TYPE_DISKSNAPSHOT] = { "disksnapshot", true },
     [VIR_CAPS_GUEST_FEATURE_TYPE_HAP] = { "hap", true },
+    [VIR_CAPS_GUEST_FEATURE_TYPE_EXTERNAL_SNAPSHOT] = { "externalSnapshot", false },
 };
 
 
index c78e3e52fa23b0a37db09d64401842904cd38bc4..9eaf6e280798ca530a9581d9169264033e14a7b1 100644 (file)
@@ -40,6 +40,7 @@ typedef enum {
     VIR_CAPS_GUEST_FEATURE_TYPE_DEVICEBOOT,
     VIR_CAPS_GUEST_FEATURE_TYPE_DISKSNAPSHOT,
     VIR_CAPS_GUEST_FEATURE_TYPE_HAP,
+    VIR_CAPS_GUEST_FEATURE_TYPE_EXTERNAL_SNAPSHOT,
 
     VIR_CAPS_GUEST_FEATURE_TYPE_LAST
 } virCapsGuestFeatureType;
index 83b414961ad6ecb8b94e6fa69b26c58d9378bdfa..b1968df258565018066969943da5a4bc17f38459 100644 (file)
             <empty/>
           </element>
         </optional>
+        <optional>
+          <element name="externalSnapshot">
+            <empty/>
+          </element>
+        </optional>
       </interleave>
     </element>
   </define>
index 3a1bfbf74dc4954bbe9157741efba316701a3478..83119e871a8a6c0b96592c0fe2524650cc3a3c1a 100644 (file)
@@ -1122,6 +1122,7 @@ virQEMUCapsInitGuestFromBinary(virCaps *caps,
     virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_DEVICEBOOT);
     virCapabilitiesAddGuestFeatureWithToggle(guest, VIR_CAPS_GUEST_FEATURE_TYPE_DISKSNAPSHOT,
                                              true, false);
+    virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_EXTERNAL_SNAPSHOT);
 
     if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_TCG)) {
         virCapabilitiesAddGuestDomain(guest, VIR_DOMAIN_VIRT_QEMU,
index b53a886b90d827d43650d5ce2187caf767b2b863..b9a5b5a1d60af9ff2b9189bd6610b60b252e35af 100644 (file)
@@ -21,6 +21,7 @@
       <cpuselection/>
       <deviceboot/>
       <disksnapshot default='on' toggle='no'/>
+      <externalSnapshot/>
     </features>
   </guest>
 
index 5dca6d3102753052ab2474b0e17787304f9cb12a..61512ed740caf00b50bb0711aa534f7aa7b191a5 100644 (file)
@@ -21,6 +21,7 @@
       <cpuselection/>
       <deviceboot/>
       <disksnapshot default='on' toggle='no'/>
+      <externalSnapshot/>
     </features>
   </guest>
 
index e7ba3917951d1ce85113b4a63fd559964a67a1f2..86d6b85ae002c76b78443315e1d315a363a69330 100644 (file)
@@ -19,6 +19,7 @@
       <cpuselection/>
       <deviceboot/>
       <disksnapshot default='on' toggle='no'/>
+      <externalSnapshot/>
     </features>
   </guest>
 
index 85623f39804cda36cdeb2be8c888984424068ef6..90859f9594523b3041f429a1222ce1ab3d4bb3eb 100644 (file)
@@ -20,6 +20,7 @@
       <cpuselection/>
       <deviceboot/>
       <disksnapshot default='on' toggle='no'/>
+      <externalSnapshot/>
     </features>
   </guest>
 
index 09b7eb7f2fb79bbce20b960f6103722fc2e83729..c6fa9502115b897d41486d766adc17a0e1fac66b 100644 (file)
@@ -19,6 +19,7 @@
       <cpuselection/>
       <deviceboot/>
       <disksnapshot default='on' toggle='no'/>
+      <externalSnapshot/>
     </features>
   </guest>
 
index bb82a150409ef3970ce160e29930f85febd546c4..6379ab73e6e5572f0a9afea7f1242fb93ca9620a 100644 (file)
@@ -20,6 +20,7 @@
       <cpuselection/>
       <deviceboot/>
       <disksnapshot default='on' toggle='no'/>
+      <externalSnapshot/>
     </features>
   </guest>
 
index 9d977c4102b5e7ce4162151d039cbb4b7a9da115..b5b158e43071a16b091fe05c060154a10544c4d6 100644 (file)
@@ -19,6 +19,7 @@
       <cpuselection/>
       <deviceboot/>
       <disksnapshot default='on' toggle='no'/>
+      <externalSnapshot/>
     </features>
   </guest>
 
index 356819a6c6c36cb065212133bf01699bd1e9707a..f5e49ba4dbd2157b4d11f184648b19771d29d3bf 100644 (file)
@@ -22,6 +22,7 @@
       <cpuselection/>
       <deviceboot/>
       <disksnapshot default='on' toggle='no'/>
+      <externalSnapshot/>
     </features>
   </guest>
 
index 35359780c42fc4d9e5a2bda51c4b795e3b477567..8dd1439a80a8f56f26b0ce96ba0d7afed8d31f92 100644 (file)
@@ -22,6 +22,7 @@
       <cpuselection/>
       <deviceboot/>
       <disksnapshot default='on' toggle='no'/>
+      <externalSnapshot/>
     </features>
   </guest>