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(a)redhat.com>
---
src/qemu/qemu_cgroup.c | 4 ----
src/qemu/qemu_process.c | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index fbf79a6d8f33..b604edb31c0d 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -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,
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 0577f4c35d08..239798fa5d7c 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -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;
--
2.15.1