[PATCH 6/8] qemu: checkpoint: Forbid creating checkpoints until we support backups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Checkpoints by themselves are not very useful for anything else than
testing the few bitmap interactions that are currently implemented.

It's very unlikely that anybody used this feature and thus we can
disable it until we have a more complete implementation ready.

Additionally the code for deleting checkpoints has many broken failure
scenarios which should be fixed first. This will require support of
deleting a bitmap in a qemu 'transaction' which was not released yet.

Curious users obviously can use the qemu namespace in the XML to enable
this for experiments:

  <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
    ...
    <qemu:capabilities>
      <qemu:add capability='incremental-backup'/>
    </qemu:capabilities>
  </domain>

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_checkpoint.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c
index 59f700e1d3..46a10cbeba 100644
--- a/src/qemu/qemu_checkpoint.c
+++ b/src/qemu/qemu_checkpoint.c
@@ -382,9 +382,9 @@ qemuCheckpointCreateXML(virDomainPtr domain,
         return NULL;
     }

-    if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BITMAP_MERGE)) {
-        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                       _("qemu binary lacks persistent bitmaps support"));
+    if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
+        virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+                       _("incremental backup is not supported yet"));
         return NULL;
     }

@@ -569,14 +569,15 @@ qemuCheckpointDelete(virDomainObjPtr vm,
         return -1;

     if (!metadata_only) {
-        if (!virDomainObjIsActive(vm)) {
+        if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
             virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
-                           _("cannot delete checkpoint for inactive domain"));
+                           _("incremental backup is not supported yet"));
             goto endjob;
         }
-        if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BITMAP_MERGE)) {
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                           _("qemu binary lacks persistent bitmaps support"));
+
+        if (!virDomainObjIsActive(vm)) {
+            virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+                           _("cannot delete checkpoint for inactive domain"));
             goto endjob;
         }
     }
-- 
2.21.0

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux