qemu: process: Setup transient disks only when starting a fresh VM

Creating the overlay for the disk is needed when starting a new VM only.
Additionally for now migration with transient disks is forbidden
anyways.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Peter Krempa 2021-04-28 11:03:19 +02:00
parent 81db8b6d89
commit 06e9b0c28d

View File

@ -7288,9 +7288,11 @@ qemuProcessLaunch(virConnectPtr conn,
qemuProcessAutoDestroyAdd(driver, vm, conn) < 0) qemuProcessAutoDestroyAdd(driver, vm, conn) < 0)
goto cleanup; goto cleanup;
VIR_DEBUG("Setting up transient disk"); if (!incoming && !snapshot) {
if (qemuSnapshotCreateDisksTransient(vm, asyncJob) < 0) VIR_DEBUG("Setting up transient disk");
goto cleanup; if (qemuSnapshotCreateDisksTransient(vm, asyncJob) < 0)
goto cleanup;
}
ret = 0; ret = 0;