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@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
goto cleanup;
}
- if (priv->cgroup &&
- virCgroupAddProcess(priv->cgroup, cpid) < 0)
- goto cleanup;
-
if (qemuSecurityDomainSetPathLabel(driver, vm, sockpath, false) < 0)
goto cleanup;
virDomainNetDefPtr net,
bool incoming)
{
- qemuDomainObjPrivatePtr priv = vm->privateData;
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
g_autoptr(virCommand) cmd = NULL;
g_autofree char *pidfile = NULL;
slirp->pid = pid;
- if (priv->cgroup && qemuSlirpSetupCgroup(slirp, priv->cgroup) < 0)
- goto error;
-
return 0;
error: