[libvirt] [PATCH v2 24/25] conf: domaincaps: Add 'backup' feature flag

Peter Krempa posted 25 patches 6 years, 2 months ago
[libvirt] [PATCH v2 24/25] conf: domaincaps: Add 'backup' feature flag
Posted by Peter Krempa 6 years, 2 months ago
This flag will allow figuring out whether the hypervisor supports the
incremental backup and checkpoint features.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 docs/formatdomaincaps.html.in  | 8 ++++++++
 docs/schemas/domaincaps.rng    | 9 +++++++++
 src/conf/domain_capabilities.c | 1 +
 src/conf/domain_capabilities.h | 1 +
 4 files changed, 19 insertions(+)

diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in
index 0bafb67705..85226328a8 100644
--- a/docs/formatdomaincaps.html.in
+++ b/docs/formatdomaincaps.html.in
@@ -517,6 +517,7 @@
     &lt;vmcoreinfo supported='yes'/&gt;
     &lt;genid supported='yes'/&gt;
     &lt;backingStoreInput supported='yes'/&gt;
+    &lt;backup supported='yes'/&gt;
     &lt;sev&gt;
       &lt;cbitpos&gt;47&lt;/cbitpos&gt;
       &lt;reduced-phys-bits&gt;1&lt;/reduced-phys-bits&gt;
@@ -560,6 +561,13 @@
     the disk to a running guest, or similar.
     </p>

+    <h4><a id="featureBackup">backup</a></h4>
+
+    <p>Reports whether the hypervisor supports the backup,checkpoint and related
+    features. (<code>virDomainBackupBegin</code>,
+    <code>virDomainCheckpointCreateXML</code> etc).
+    </p>
+
     <h4><a id="elementsSEV">SEV capabilities</a></h4>

     <p>AMD Secure Encrypted Virtualization (SEV) capabilities are exposed under
diff --git a/docs/schemas/domaincaps.rng b/docs/schemas/domaincaps.rng
index 88b545ec2a..682cc82177 100644
--- a/docs/schemas/domaincaps.rng
+++ b/docs/schemas/domaincaps.rng
@@ -210,6 +210,9 @@
       <optional>
         <ref name='backingStoreInput'/>
       </optional>
+      <optional>
+        <ref name='backup'/>
+      </optional>
       <optional>
         <ref name='sev'/>
       </optional>
@@ -241,6 +244,12 @@
     </element>
   </define>

+  <define name='backup'>
+    <element name='backup'>
+      <ref name='supported'/>
+    </element>
+  </define>
+
   <define name='sev'>
     <element name='sev'>
       <ref name='supported'/>
diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
index ca208f2340..921d795630 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -41,6 +41,7 @@ VIR_ENUM_IMPL(virDomainCapsFeature,
               "vmcoreinfo",
               "genid",
               "backingStoreInput",
+              "backup",
 );

 static virClassPtr virDomainCapsClass;
diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h
index 4ec9fe006c..9f4a23d015 100644
--- a/src/conf/domain_capabilities.h
+++ b/src/conf/domain_capabilities.h
@@ -163,6 +163,7 @@ typedef enum {
     VIR_DOMAIN_CAPS_FEATURE_VMCOREINFO,
     VIR_DOMAIN_CAPS_FEATURE_GENID,
     VIR_DOMAIN_CAPS_FEATURE_BACKING_STORE_INPUT,
+    VIR_DOMAIN_CAPS_FEATURE_BACKUP,

     VIR_DOMAIN_CAPS_FEATURE_LAST
 } virDomainCapsFeature;
-- 
2.23.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2 24/25] conf: domaincaps: Add 'backup' feature flag
Posted by Daniel P. Berrangé 6 years, 2 months ago
On Tue, Dec 03, 2019 at 06:17:46PM +0100, Peter Krempa wrote:
> This flag will allow figuring out whether the hypervisor supports the
> incremental backup and checkpoint features.
> 
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>  docs/formatdomaincaps.html.in  | 8 ++++++++
>  docs/schemas/domaincaps.rng    | 9 +++++++++
>  src/conf/domain_capabilities.c | 1 +
>  src/conf/domain_capabilities.h | 1 +
>  4 files changed, 19 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 24/25] conf: domaincaps: Add 'backup' feature flag
Posted by Eric Blake 6 years, 2 months ago
On 12/3/19 11:17 AM, Peter Krempa wrote:
> This flag will allow figuring out whether the hypervisor supports the
> incremental backup and checkpoint features.
> 
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>   docs/formatdomaincaps.html.in  | 8 ++++++++
>   docs/schemas/domaincaps.rng    | 9 +++++++++
>   src/conf/domain_capabilities.c | 1 +
>   src/conf/domain_capabilities.h | 1 +
>   4 files changed, 19 insertions(+)
> 
> diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in
> index 0bafb67705..85226328a8 100644
> --- a/docs/formatdomaincaps.html.in
> +++ b/docs/formatdomaincaps.html.in
> @@ -517,6 +517,7 @@
>       &lt;vmcoreinfo supported='yes'/&gt;
>       &lt;genid supported='yes'/&gt;
>       &lt;backingStoreInput supported='yes'/&gt;
> +    &lt;backup supported='yes'/&gt;
>       &lt;sev&gt;
>         &lt;cbitpos&gt;47&lt;/cbitpos&gt;
>         &lt;reduced-phys-bits&gt;1&lt;/reduced-phys-bits&gt;
> @@ -560,6 +561,13 @@
>       the disk to a running guest, or similar.
>       </p>
> 
> +    <h4><a id="featureBackup">backup</a></h4>
> +
> +    <p>Reports whether the hypervisor supports the backup,checkpoint and related

space after comma.

Reviewed-by: Eric Blake <eblake@redhat.com>

Hmm - as of this series, the test driver supports checkpoints but not 
(yet) backups.  Are there plans to get rudimentary backup support into 
the test driver as well, so that we can declare the feature there as 
well as in qemu?

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2 24/25] conf: domaincaps: Add 'backup' feature flag
Posted by Peter Krempa 6 years, 2 months ago
On Mon, Dec 09, 2019 at 12:57:52 -0600, Eric Blake wrote:
> On 12/3/19 11:17 AM, Peter Krempa wrote:
> > This flag will allow figuring out whether the hypervisor supports the
> > incremental backup and checkpoint features.
> > 
> > Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> > ---
> >   docs/formatdomaincaps.html.in  | 8 ++++++++
> >   docs/schemas/domaincaps.rng    | 9 +++++++++
> >   src/conf/domain_capabilities.c | 1 +
> >   src/conf/domain_capabilities.h | 1 +
> >   4 files changed, 19 insertions(+)
> > 
> > diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in
> > index 0bafb67705..85226328a8 100644
> > --- a/docs/formatdomaincaps.html.in
> > +++ b/docs/formatdomaincaps.html.in
> > @@ -517,6 +517,7 @@
> >       &lt;vmcoreinfo supported='yes'/&gt;
> >       &lt;genid supported='yes'/&gt;
> >       &lt;backingStoreInput supported='yes'/&gt;
> > +    &lt;backup supported='yes'/&gt;
> >       &lt;sev&gt;
> >         &lt;cbitpos&gt;47&lt;/cbitpos&gt;
> >         &lt;reduced-phys-bits&gt;1&lt;/reduced-phys-bits&gt;
> > @@ -560,6 +561,13 @@
> >       the disk to a running guest, or similar.
> >       </p>
> > 
> > +    <h4><a id="featureBackup">backup</a></h4>
> > +
> > +    <p>Reports whether the hypervisor supports the backup,checkpoint and related
> 
> space after comma.
> 
> Reviewed-by: Eric Blake <eblake@redhat.com>
> 
> Hmm - as of this series, the test driver supports checkpoints but not (yet)
> backups.  Are there plans to get rudimentary backup support into the test
> driver as well, so that we can declare the feature there as well as in qemu?

I think I'll spend my time on adding snapshot and blockjob support with
checkpoints rather than test driver support.

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list