domain: save/restore the state of dbus-daemon running

This avoids trying to start a dbus-daemon when its already running.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Marc-André Lureau 2020-02-25 10:55:09 +01:00 committed by Michal Privoznik
parent 8ef82dec5c
commit f58c51b317

View File

@ -2971,6 +2971,9 @@ qemuDomainObjPrivateXMLFormat(virBufferPtr buf,
virDomainChrTypeToString(priv->monConfig->type));
}
if (priv->dbusDaemonRunning)
virBufferAddLit(buf, "<dbusDaemon/>\n");
if (priv->namespaces) {
ssize_t ns = -1;
@ -3756,6 +3759,8 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
goto error;
}
priv->dbusDaemonRunning = virXPathBoolean("boolean(./dbusDaemon)", ctxt) > 0;
if ((node = virXPathNode("./namespaces", ctxt))) {
xmlNodePtr next;