From: Marc-André Lureau <marcandre.lureau(a)redhat.com>
The daemon is started on daemon in external devices and hotplug code.
Add a mechanism to start it before qemu, if qemu itself needs it. (it is
already stopped in qemuProcessStop)
Signed-off-by: Marc-André Lureau <marcandre.lureau(a)redhat.com>
---
src/qemu/qemu_domain.h | 1 +
src/qemu/qemu_process.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 6728ab047ed0..575fb8393b83 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -237,6 +237,7 @@ struct _qemuDomainObjPrivate {
/* running backup job */
virDomainBackupDef *backup;
+ bool dbusDaemonWanted;
bool dbusDaemonRunning;
/* list of Ids to migrate */
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index d5f8a47ac293..4ca9b100a802 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -7284,6 +7284,10 @@ qemuProcessLaunch(virConnectPtr conn,
&nnicindexes, &nicindexes, 0)))
goto cleanup;
+ if (QEMU_DOMAIN_PRIVATE(vm)->dbusDaemonWanted &&
+ qemuDBusStart(driver, vm) < 0)
+ goto cleanup;
+
if (incoming && incoming->fd != -1)
virCommandPassFD(cmd, incoming->fd, 0);
--
2.33.0.721.g106298f7f9