diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index c9f5cbbf29..b266f5743d 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -1669,9 +1669,9 @@ qemuBlockStorageSourceAttachApply(qemuMonitor *mon, qemuBlockStorageSourceAttachData *data) { if (qemuBlockStorageSourceAttachApplyStorageDeps(mon, data) < 0 || + qemuBlockStorageSourceAttachApplyFormatDeps(mon, data) < 0 || qemuBlockStorageSourceAttachApplyStorage(mon, data) < 0 || qemuBlockStorageSourceAttachApplyStorageSlice(mon, data) < 0 || - qemuBlockStorageSourceAttachApplyFormatDeps(mon, data) < 0 || qemuBlockStorageSourceAttachApplyFormat(mon, data) < 0) return -1; @@ -2636,6 +2636,8 @@ qemuBlockStorageSourceCreate(virDomainObj *vm, goto cleanup; rc = qemuBlockStorageSourceAttachApplyStorageDeps(priv->mon, data); + if (rc == 0) + rc = qemuBlockStorageSourceAttachApplyFormatDeps(priv->mon, data); qemuDomainObjExitMonitor(vm); if (rc < 0) @@ -2649,9 +2651,6 @@ qemuBlockStorageSourceCreate(virDomainObj *vm, rc = qemuBlockStorageSourceAttachApplyStorage(priv->mon, data); - if (rc == 0) - rc = qemuBlockStorageSourceAttachApplyFormatDeps(priv->mon, data); - qemuDomainObjExitMonitor(vm); if (rc < 0) goto cleanup;