diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index e74cd7413a..539a861661 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -685,6 +685,11 @@ int qemuSetupCgroupForEmulator(struct qemud_driver *driver, } for (i = 0; i < VIR_CGROUP_CONTROLLER_LAST; i++) { + if (i != VIR_CGROUP_CONTROLLER_CPU && + i != VIR_CGROUP_CONTROLLER_CPUACCT && + i != VIR_CGROUP_CONTROLLER_CPUSET) + continue; + if (!qemuCgroupControllerActive(driver, i)) continue; rc = virCgroupMoveTask(cgroup, cgroup_emulator, i); diff --git a/src/util/cgroup.c b/src/util/cgroup.c index 0825801c06..baf40483cb 100644 --- a/src/util/cgroup.c +++ b/src/util/cgroup.c @@ -882,8 +882,7 @@ int virCgroupMoveTask(virCgroupPtr src_group, virCgroupPtr dest_group, if (!src_group->controllers[controller].mountPoint || !dest_group->controllers[controller].mountPoint) { - VIR_WARN("no vm cgroup in controller %d", controller); - return 0; + return -EINVAL; } rc = virCgroupGetValueStr(src_group, controller, "tasks", &content);