LXC - Cgroup memory controller: none

I try to install LXC (0.7.4.1) on my Debian 6, but when I run lxc-checkconfig, I get "Group 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 to google search, I need to recompile my kernel, but I don't know how to do it. Can anyone explain me how to do this?

Best wishes

+6
source share
3 answers

The Debian 6 kernel does not have a cgroup memory function. However, you can run lxc without it.

If you need a memory group, it is easy to install a new kernel from backports .

  • Add apt-line backports
  • Run "apt-get install linux-image-3.2.0-0.bpo.4-amd64" (or -686 for i386)
  • Add the kernel boot parameter "cgroup_enable = memory" to the bootloader configuration (for example, / etc / default / grub) to enable it.
  • reboot

Or, if you want to recompile the kernel, you can use the Debian package kernel system; http://newbiedoc.sourceforge.net/system/kernel-pkg.html

+5
source

I have problems with this kind of memory and I looked at it a bit. I wrote a blog post:

http://blog.raymond.burkholder.net/index.php?/archives/639-Debian-Stretch-LXC-Memory-Controller.html

Thus, the kernel is compiled with the necessary cgroup memory support. Fly-in-maz: lxc-checkconfig has an error in it and will not correctly display the status of a memory group. CONFIG_CGROUP_MEM_RES_CTLR=y applies only to old kernels (sometimes up to 3.6, I think).

I make two adjustments: one setting on /boot/config-$version and one setting on /etc/default/grub . Both are explained in the article.

But the bottom line, the general recommendation, is this: don't turn it on unless you really need to manage memory limits on containers. There are some performance and memory issues.

+3
source

Update the kernel from here .

Then reboot the system. This problem is solved automatically, but if you do not go to /boot/config-<versionnumber>-generic . For example: /boot/config-3.11.0-13-generic

Here, see if CONFIG_CGROUP_MEM_RES_CTLR=y or not. If yes, then fine, otherwise paste it in.

+2
source

All Articles