[PATCH 02/35] qemu: process: Setup transient disks only when starting a fresh VM

Peter Krempa pkrempa at redhat.com
Fri May 21 12:47:02 UTC 2021


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 at redhat.com>
---
 src/qemu/qemu_process.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 35213f81ec..543b50f875 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -7289,9 +7289,11 @@ qemuProcessLaunch(virConnectPtr conn,
         qemuProcessAutoDestroyAdd(driver, vm, conn) < 0)
         goto cleanup;

-    VIR_DEBUG("Setting up transient disk");
-    if (qemuSnapshotCreateDisksTransient(vm, asyncJob) < 0)
-        goto cleanup;
+    if (!incoming && !snapshot) {
+        VIR_DEBUG("Setting up transient disk");
+        if (qemuSnapshotCreateDisksTransient(vm, asyncJob) < 0)
+            goto cleanup;
+    }

     ret = 0;

-- 
2.31.1




More information about the libvir-list mailing list