capabilities: report full external snapshot support

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>
This commit is contained in:
Pavel Hrdina 2023-08-24 18:19:52 +02:00
parent 819ae888ec
commit b5becaea31
14 changed files with 24 additions and 0 deletions

View 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 creating external disk snapshots is supported. If absent, creating external
snapshots may still be supported, but it requires attempting the API and 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` 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 Examples
~~~~~~~~ ~~~~~~~~
@ -318,6 +324,7 @@ capabilities enabled in the chip and BIOS you will see:
<cpuselection/> <cpuselection/>
<deviceboot/> <deviceboot/>
<disksnapshot default='on' toggle='no'/> <disksnapshot default='on' toggle='no'/>
<externalSnapshot/>
</features> </features>
</guest> </guest>

View 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_DEVICEBOOT] = { "deviceboot", false },
[VIR_CAPS_GUEST_FEATURE_TYPE_DISKSNAPSHOT] = { "disksnapshot", true }, [VIR_CAPS_GUEST_FEATURE_TYPE_DISKSNAPSHOT] = { "disksnapshot", true },
[VIR_CAPS_GUEST_FEATURE_TYPE_HAP] = { "hap", true }, [VIR_CAPS_GUEST_FEATURE_TYPE_HAP] = { "hap", true },
[VIR_CAPS_GUEST_FEATURE_TYPE_EXTERNAL_SNAPSHOT] = { "externalSnapshot", false },
}; };

View File

@ -40,6 +40,7 @@ typedef enum {
VIR_CAPS_GUEST_FEATURE_TYPE_DEVICEBOOT, VIR_CAPS_GUEST_FEATURE_TYPE_DEVICEBOOT,
VIR_CAPS_GUEST_FEATURE_TYPE_DISKSNAPSHOT, VIR_CAPS_GUEST_FEATURE_TYPE_DISKSNAPSHOT,
VIR_CAPS_GUEST_FEATURE_TYPE_HAP, VIR_CAPS_GUEST_FEATURE_TYPE_HAP,
VIR_CAPS_GUEST_FEATURE_TYPE_EXTERNAL_SNAPSHOT,
VIR_CAPS_GUEST_FEATURE_TYPE_LAST VIR_CAPS_GUEST_FEATURE_TYPE_LAST
} virCapsGuestFeatureType; } virCapsGuestFeatureType;

View File

@ -493,6 +493,11 @@
<empty/> <empty/>
</element> </element>
</optional> </optional>
<optional>
<element name="externalSnapshot">
<empty/>
</element>
</optional>
</interleave> </interleave>
</element> </element>
</define> </define>

View File

@ -1122,6 +1122,7 @@ virQEMUCapsInitGuestFromBinary(virCaps *caps,
virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_DEVICEBOOT); virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_DEVICEBOOT);
virCapabilitiesAddGuestFeatureWithToggle(guest, VIR_CAPS_GUEST_FEATURE_TYPE_DISKSNAPSHOT, virCapabilitiesAddGuestFeatureWithToggle(guest, VIR_CAPS_GUEST_FEATURE_TYPE_DISKSNAPSHOT,
true, false); true, false);
virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_EXTERNAL_SNAPSHOT);
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_TCG)) { if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_TCG)) {
virCapabilitiesAddGuestDomain(guest, VIR_DOMAIN_VIRT_QEMU, virCapabilitiesAddGuestDomain(guest, VIR_DOMAIN_VIRT_QEMU,

View File

@ -21,6 +21,7 @@
<cpuselection/> <cpuselection/>
<deviceboot/> <deviceboot/>
<disksnapshot default='on' toggle='no'/> <disksnapshot default='on' toggle='no'/>
<externalSnapshot/>
</features> </features>
</guest> </guest>

View File

@ -21,6 +21,7 @@
<cpuselection/> <cpuselection/>
<deviceboot/> <deviceboot/>
<disksnapshot default='on' toggle='no'/> <disksnapshot default='on' toggle='no'/>
<externalSnapshot/>
</features> </features>
</guest> </guest>

View File

@ -19,6 +19,7 @@
<cpuselection/> <cpuselection/>
<deviceboot/> <deviceboot/>
<disksnapshot default='on' toggle='no'/> <disksnapshot default='on' toggle='no'/>
<externalSnapshot/>
</features> </features>
</guest> </guest>

View File

@ -20,6 +20,7 @@
<cpuselection/> <cpuselection/>
<deviceboot/> <deviceboot/>
<disksnapshot default='on' toggle='no'/> <disksnapshot default='on' toggle='no'/>
<externalSnapshot/>
</features> </features>
</guest> </guest>

View File

@ -19,6 +19,7 @@
<cpuselection/> <cpuselection/>
<deviceboot/> <deviceboot/>
<disksnapshot default='on' toggle='no'/> <disksnapshot default='on' toggle='no'/>
<externalSnapshot/>
</features> </features>
</guest> </guest>

View File

@ -20,6 +20,7 @@
<cpuselection/> <cpuselection/>
<deviceboot/> <deviceboot/>
<disksnapshot default='on' toggle='no'/> <disksnapshot default='on' toggle='no'/>
<externalSnapshot/>
</features> </features>
</guest> </guest>

View File

@ -19,6 +19,7 @@
<cpuselection/> <cpuselection/>
<deviceboot/> <deviceboot/>
<disksnapshot default='on' toggle='no'/> <disksnapshot default='on' toggle='no'/>
<externalSnapshot/>
</features> </features>
</guest> </guest>

View File

@ -22,6 +22,7 @@
<cpuselection/> <cpuselection/>
<deviceboot/> <deviceboot/>
<disksnapshot default='on' toggle='no'/> <disksnapshot default='on' toggle='no'/>
<externalSnapshot/>
</features> </features>
</guest> </guest>

View File

@ -22,6 +22,7 @@
<cpuselection/> <cpuselection/>
<deviceboot/> <deviceboot/>
<disksnapshot default='on' toggle='no'/> <disksnapshot default='on' toggle='no'/>
<externalSnapshot/>
</features> </features>
</guest> </guest>