Reconnect to the VM is a possibly long-running job spawned in a separate
thread. We should reload the snapshot defs and managedsave state prior
to spawning the thread to avoid blocking of the daemon startup which
would serialize on the VM lock.
Also the reloading code would violate the domain job held while
reconnecting as the loader functions don't create jobs.
---
src/qemu/qemu_driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5dc62b0..31565bb 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -873,8 +873,6 @@ qemuStateInitialize(bool privileged,
NULL, NULL) < 0)
goto error;
- qemuProcessReconnectAll(conn, qemu_driver);
-
virDomainObjListForEach(qemu_driver->domains,
qemuDomainSnapshotLoad,
cfg->snapshotDir);
@@ -883,6 +881,8 @@ qemuStateInitialize(bool privileged,
qemuDomainManagedSaveLoad,
qemu_driver);
+ qemuProcessReconnectAll(conn, qemu_driver);
+
qemu_driver->workerPool = virThreadPoolNew(0, 1, 0, qemuProcessEventHandler,
qemu_driver);
if (!qemu_driver->workerPool)
goto error;
--
2.1.0