Welcome to the Linux Foundation Forum!

Lab 2.1 error with Debian VM

Options
sytranvn
sytranvn Posts: 1
edited March 29 in LFS253 Class Forum

Hi, when I set up a GCP VM using debian-11-bullseye-v20230711 image and ran lscgroup I got this error

cgroups can't be listed: Cgroup is not mounted

But with an Ubuntu 20.04 I can run lscgroup and see output.
Why does it work on Ubuntu but not Debian, does lscgroup work on any distro?

Answers

  • chrispokorni
    chrispokorni Posts: 2,181
    Options

    Hi @sytranvn,

    It may have something to do with the migration to cgroup v2 from v1 by some Linux distributions.

    For future lab exercises I encourage you to use the recommended guest OS when setting up VMs for the lab environment.

    Regards,
    -Chris

  • hricky
    hricky Posts: 16
    Options

    Debian 11 ("bullseye") should use Control Group v2 by default, similar to other recent Linux distributions. An easy way to check which version of cgroup your distribution is using is to run the command:

    stat --file-system --format %T /sys/fs/cgroup/

    For cgroup v2 the output should be cgroup2fs and for cgroup v1 tmpfs.

Categories

Upcoming Training