diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c index 6bcbb7e1a0b9a7aa6a9117e2c1bdefdaa6abb21d..3f4548b5324a3457566a6e4a81ec2a30b77d61a1 100644 --- a/src/util/vircgroupv2.c +++ b/src/util/vircgroupv2.c @@ -404,7 +404,8 @@ virCgroupV2MakeGroup(virCgroupPtr parent ATTRIBUTE_UNUSED, return -1; } - if (virCgroupV2EnableController(parent, + if (virCgroupV2HasController(parent, VIR_CGROUP_CONTROLLER_CPU) && + virCgroupV2EnableController(parent, VIR_CGROUP_CONTROLLER_CPU) < 0) { return -1; }