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

Ethier, Michael methier at CGR.Harvard.edu
Wed Aug 7 13:32:21 UTC 2013


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)

[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

I did a strace with the start command and it seems it can't execute mkdir:

access("/cgroup/lxc/host1", F_OK)       = -1 ENOENT (No such file or directory)
mkdir("/cgroup/lxc/host1", 0755)        = -1 EINVAL (Invalid argument)
write(3, "      lxc-start 1375881857.425 E"..., 76) = 76
write(2, "lxc-start: ", 11lxc-start: )             = 11
write(2, "Error creating cgroups", 22Error creating cgroups)  = 22

Sure enough, I can't create a dir below the lxc level, but I can at the lxc level:

[root at sandbox ~]# mkdir /cgroup/lxc/host1
mkdir: cannot create directory `/cgroup/lxc/host1': Invalid argument

[root at sandbox ~]# mkdir /cgroup/foo
[root at sandbox ~]# rmdir /cgroup/foo

[root at sandbox ~]# uname -a
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

Any ideas why this is happening and how to fix it ?

Thanks in advance,
Mike


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130807/0e023fe9/attachment.html>


More information about the lxc-users mailing list