LXC - Cgroup memory controller: missing

André Bolinhas picture André Bolinhas · Mar 24, 2013 · Viewed 11.4k times · Source

I'm trying install LXC (0.7.4.1) on my Debian 6 but when I run the lxc-checkconfig I get "Cgroup memory controller: missing"

root@lxcsrv01:~# lxc-checkconfig
Kernel config /proc/config.gz not found, looking in other places...
Found kernel config file /boot/config-2.6.32-5-686
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled
Multiple /dev/pts instances: enabled

--- Control groups ---
Cgroup: enabled
Cgroup namespace: enabled
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: missing
Cgroup cpuset: enabled

--- Misc ---
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
File capabilities: enabled
enabled

Note : Before booting a new kernel, you can check its configuration
usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig

According google search I need to recompile my kernel but I don't know how. Someone can explain me how to do this?

Best regards

Answer

sugi picture sugi · Mar 26, 2013

The kernel of Debian 6 has no memory cgroup feature. However you can run lxc without it.

If you NEED memory cgroup, it's easy to install the new kernel from backports.

  1. Add apt-line of backports
  2. Run "apt-get install linux-image-3.2.0-0.bpo.4-amd64" (or -686 for i386)
  3. Add a kernel boot option "cgroup_enable=memory" to your bootloader setting (e.g. /etc/default/grub) to enable it.
  4. reboot

Or, if you'd like to re-compile the kernel, you can use kernel-package system of Debian; http://newbiedoc.sourceforge.net/system/kernel-pkg.html