1

I'm trying to run lxc inside of a chroot.

$ lxc-start -n instrument --logfile=/dev/stdout
lxc-start 20190619141851.659 ERROR    lxc_cgfs - cgroups/cgfs.c:cgfs_init:2359 - cgroupfs failed to detect cgroup metadata

I tried to mount (where target the path to my chroot is):

/bin/bash -c "sudo mount --bind /proc ${target}/root/proc/"
/bin/bash -c "sudo mount --bind /sys ${target}/root/sys/"
/bin/bash -c "sudo mount --bind /dev ${target}/root/dev/"
/bin/bash -c "sudo mount --bind /dev/pts ${target}/root/dev/pts"

/bin/bash -c "sudo mount --bind /sys/fs ${target}/root/sys/fs"
  • 2
    Since you are bind mounting /dev, and /sys, the last two commands to bind /dev/pts, and /sys/fs are redundant. – Lucas Ramage Jun 19 at 15:12
0

Installing cgroupfs-mount and running it seems to be enough to mount all needed cgroupfs mounts.

apt install cgroupfs-mount
/usr/bin/cgroupfs-mount

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.