I have a Debian squeeze kernel (linux-image-2.6.32-5-openvz-amd64) which according to the Doku should support cgroups. When I look into the kernel configuration, it does (or is some other kernel configuration required?)
# zgrep -i cgroup /boot/config-2.6.32-5-openvz-amd64
# CONFIG_CGROUP_SCHED is not set
CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set
CONFIG_CGROUP_DEVICE=y
CONFIG_BLK_CGROUP=y
# CONFIG_DEBUG_BLK_CGROUP is not set
CONFIG_NET_CLS_CGROUP=y
Also, according to http://wiki.debian.org/LXC, a kernel parameter cgroup_enable=memory might be necessary. I started the kernel with it:
# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-2.6.32-5-openvz-amd64 root=UUID=6332fe39-7eaa-4519-b6c1-e05808284586 ro cgroup_enable=memory quiet console=ttyS0,57600n8
However, the system still has no cgroup support! The cgroup file system cannot be mounted as the file system type is not even known to the system:
# mount -t cgroup none /cgroup
mount: unknown filesystem type 'cgroup'
and:
# grep -i cgroup /proc/filesystems
#
So there is either a bug or I miss something. Can anyone tell me what? Is there a kernel parameter missing? A kernel configuration?