I have ubuntu 21.10 installed. I confirmed that I am using cgroup v2 by running mount
, which shows cgrup2 on /sys/fs/cgroup type cgroup2
.
When I want to use cgcreate
from cgroup-tools
to create a new group for cpu
:
sudo cgcreate -g cpu:newgroup # or
sudo cgcreate -g all:newgroup
it fails with error:
cgcreate: libcgroup initialization failed: Cgroup is not mounted
I have several questions:
- Is this because
cgroup-tools
is for cgroup v1? - What should I use to create new cgroups for cgroup v2?
- How to create persistent cgroups (when booting) using config files for cgroup v2?