Trying to start a Linux container, I get the following:
lxc-start: No cgroup mounted on the system
OS is Debian 7.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityLXC (or other uses of the cgroups facility) requires the cgroups filesystem to be mounted (see §2.1 in the cgroups kernel documentation). It seems that as of Debian wheezy, this doesn't happen automatically.
Add the following line to /etc/fstab
:
cgroup /sys/fs/cgroup cgroup defaults
For a one-time thing, mount it manually:
mount -t cgroup cgroup /sys/fs/cgroup
For lxc
in Debian Wheezy I use in /etc/fstab
:
cgroup /sys/fs/cgroup cgroup defaults,blkio,net_cls,freezer,devices,cpuacct,cpu,cpuset,memory,clone_children 0 0
In /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet cgroup_enable=memory,namespace"
(& don't forget to run update-grub
)
It is also possible to run LXC 1.0.7 on Debian Wheezy