[Lxc-users] lxc-start: Error creating cgroups

Sean Pajot sean.pajot at execulink.com
Wed Aug 7 14:12:56 UTC 2013


On 08/07/2013 09:32 AM, Ethier, Michael wrote:
> Hi,
>
> I am trying to start a lxc container I have setup on a test Centos 6.4 box. I
> downloaded and built lxc-0.9.0
>
> and installed it into /opt/lxc-0.9.0. I believe I have it setup properly and
> my test lxc host is called host1.
>
> When I try to start it I get:
>
> [root at sandbox ~]# lxc-start -n host1
> lxc-start: Error creating cgroups
> lxc-start: failed to spawn 'host1'
> I have /cgroup mounted:
> [root at sandbox ~]# mount |grep cgroup
> cgroup on /cgroup type cgroup (rw)

Since there's no options specified here, that means you have everything 
mounted in a single big cgroup.


> [root at sandbox ~]# cat /proc/mounts | grep cgroup
> cgroup /cgroup cgroup rw,relatime,net_prio,perf_event,blkio,net_cls,freezer,devices,memory,cpuacct,cpu,ns,cpuset 0 0

Indeed.


> access("/cgroup/lxc/host1", F_OK)       = -1 ENOENT (No such file or directory)
> mkdir("/cgroup/lxc/host1", 0755)        = -1 EINVAL (Invalid argument)

> Linux sandbox.rc.fas.harvard.edu 2.6.32-358.11.1.el6.x86_64 #1 SMP Wed Jun 12
> 03:34:52 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
> [root at sandbox ~]# more /etc/issue
> CentOS release 6.4 (Final)
> Kernel \r on an \m


When you mount lots of control groups together the whole thing inherits the 
limitations of all of them at once. Some don't support multi-level 
hierarchies, especially with EL 6 distributions which are running somewhat 
older kernels.

There's a few possible solutions. Running an older version of LXC (I know 
0.7.5 works) might be the easiest way out since it was released at a time when 
this was the typical kernel version.




More information about the lxc-users mailing list