goto endjob;
}
- if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
+ if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_BACKUP)) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
- _("incremental backup is not supported yet"));
+ _("backup is not supported with this QEMU"));
goto endjob;
}
+ if (virDomainBackupAlignDisks(def, vm->def, suffix) < 0)
+ goto endjob;
+
+ if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
+ size_t i;
+
+ if (chkdef) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("creating checkpoint for incremental backup is not supported yet"));
+ goto endjob;
+ }
+
+ for (i = 0; i < def->ndisks; i++) {
+ if (def->disks[i].backupmode == VIR_DOMAIN_BACKUP_DISK_BACKUP_MODE_INCREMENTAL) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("incremental backup is not supported yet"));
+ goto endjob;
+ }
+ }
+ }
+
if (priv->backup) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("another backup job is already running"));
if (qemuBackupBeginPrepareTLS(vm, cfg, def, &tlsProps, &tlsSecretProps) < 0)
goto endjob;
- if (virDomainBackupAlignDisks(def, vm->def, suffix) < 0)
- goto endjob;
-
actions = virJSONValueNewArray();
/* The 'chk' checkpoint must be rolled back if the transaction command
g_auto(virBuffer) attrBuf = VIR_BUFFER_INITIALIZER;
g_auto(virBuffer) childBuf = VIR_BUFFER_INIT_CHILD(buf);
- if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP))
- return 0;
-
if (priv->backup &&
virDomainBackupDefFormat(&childBuf, priv->backup, true) < 0)
return -1;