1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-24 06:03:52 +03:00

qemu: Restore machinename even without cgroups

The virresctrl will use this as well and we need to have that info after restart
to properly clean up /sys/fs/resctrl.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2018-01-30 23:57:24 +01:00
parent 859186091c
commit 272649a1d7
2 changed files with 4 additions and 4 deletions

View File

@ -986,10 +986,6 @@ qemuConnectCgroup(virDomainObjPtr vm)
if (!virCgroupAvailable())
goto done;
priv->machineName = qemuDomainGetMachineName(vm);
if (!priv->machineName)
goto cleanup;
virCgroupFree(&priv->cgroup);
if (virCgroupNewDetectMachine(vm->def->name,

View File

@ -7198,6 +7198,10 @@ qemuProcessReconnect(void *opaque)
if (qemuHostdevUpdateActiveDomainDevices(driver, obj->def) < 0)
goto error;
priv->machineName = qemuDomainGetMachineName(obj);
if (!priv->machineName)
goto error;
if (qemuConnectCgroup(obj) < 0)
goto error;