if (virDomainBlockCommitEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
- if (qemuDomainSupportsCheckpointsBlockjobs(vm) < 0)
- goto cleanup;
-
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
blockdev = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV);
- if (!blockdev && (flags & VIR_DOMAIN_BLOCK_COMMIT_DELETE)) {
- virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
- _("deleting committed images is not supported by this VM"));
- goto endjob;
- }
-
/* Convert bandwidth MiB to bytes, if necessary */
if (!(flags & VIR_DOMAIN_BLOCK_COMMIT_BANDWIDTH_BYTES)) {
if (speed > LLONG_MAX >> 20) {
if (qemuDomainDiskBlockJobIsActive(disk))
goto endjob;
+ if (qemuDomainSupportsCheckpointsBlockjobs(vm) < 0)
+ goto endjob;
+
+ if (!blockdev && (flags & VIR_DOMAIN_BLOCK_COMMIT_DELETE)) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("deleting committed images is not supported by this VM"));
+ goto endjob;
+ }
+
if (!top || STREQ(top, disk->dst))
topSource = disk->src;
else if (virStorageFileParseChainIndex(disk->dst, top, &topIndex) < 0 ||