In both cases priv->cgroup will always be NULL because it is called before the QEMU process is started and cgroups are configured. In qemuProcessLaunch() the call order is following: qemuExtDevicesStart() ... virCommandRun() ... qemuSetupCgroup() where qemuDBusStart() is called from qemuExtDevicesStart() but we cgroups are created in qemuSetupCgroup(). Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- src/qemu/qemu_dbus.c | 4 ---- src/qemu/qemu_slirp.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/qemu/qemu_dbus.c b/src/qemu/qemu_dbus.c index 81042876fe..a0567e55a3 100644 --- a/src/qemu/qemu_dbus.c +++ b/src/qemu/qemu_dbus.c @@ -268,10 +268,6 @@ qemuDBusStart(virQEMUDriverPtr driver, goto cleanup; } - if (priv->cgroup && - virCgroupAddProcess(priv->cgroup, cpid) < 0) - goto cleanup; - if (qemuSecurityDomainSetPathLabel(driver, vm, sockpath, false) < 0) goto cleanup; diff --git a/src/qemu/qemu_slirp.c b/src/qemu/qemu_slirp.c index dfb36125f0..4c4949f88b 100644 --- a/src/qemu/qemu_slirp.c +++ b/src/qemu/qemu_slirp.c @@ -251,7 +251,6 @@ qemuSlirpStart(qemuSlirpPtr slirp, virDomainNetDefPtr net, bool incoming) { - qemuDomainObjPrivatePtr priv = vm->privateData; g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver); g_autoptr(virCommand) cmd = NULL; g_autofree char *pidfile = NULL; @@ -356,9 +355,6 @@ qemuSlirpStart(qemuSlirpPtr slirp, slirp->pid = pid; - if (priv->cgroup && qemuSlirpSetupCgroup(slirp, priv->cgroup) < 0) - goto error; - return 0; error: -- 2.26.2