]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuProcessStartWithMemoryState: Don't start qemu with '-loadvm SNAP' and '-incoming...
authorPeter Krempa <pkrempa@redhat.com>
Fri, 1 Dec 2023 09:28:48 +0000 (10:28 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 1 Dec 2023 10:35:14 +0000 (11:35 +0100)
A bug in qemuProcessStartWithMemoryState caused that we would start qemu
with '-loadvm SNAP' and '-incoming defer' together.  qemu doesn't expect
that and crashes on an assertion failure [1].

[1]: https://issues.redhat.com/browse/RHEL-16782

Fixes: 8a88d3e5860881f430e528d3e5e8d6455ded4d1d
Resolves: https://issues.redhat.com/browse/RHEL-17841
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_process.c

index f32e82bbd19fa092edc07347d0c7ad874a80a953..fc05b4b24fb8115cfb293df814cb06f132edc918 100644 (file)
@@ -8196,6 +8196,7 @@ qemuProcessStartWithMemoryState(virConnectPtr conn,
     VIR_AUTOCLOSE intermediatefd = -1;
     g_autoptr(virCommand) cmd = NULL;
     g_autofree char *errbuf = NULL;
+    const char *migrateFrom = NULL;
     int rc = 0;
 
     if (data) {
@@ -8207,6 +8208,8 @@ qemuProcessStartWithMemoryState(virConnectPtr conn,
                                             &errbuf, &cmd) < 0) {
             return -1;
         }
+
+        migrateFrom = "stdio";
     }
 
     /* No cookie means libvirt which saved the domain was too old to mess up
@@ -8220,7 +8223,7 @@ qemuProcessStartWithMemoryState(virConnectPtr conn,
         priv->disableSlirp = true;
 
     if (qemuProcessStart(conn, driver, vm, cookie ? cookie->cpu : NULL,
-                         asyncJob, "stdio", *fd, path, snapshot,
+                         asyncJob, migrateFrom, *fd, path, snapshot,
                          VIR_NETDEV_VPORT_PROFILE_OP_RESTORE,
                          start_flags) == 0)
         *started = true;