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@sandbox ~]# lxc-start -n host1
lxc-start: Error creating cgroups
lxc-start: failed to spawn 'host1'

I have /cgroup mounted:
[root@sandbox ~]# mount |grep cgroup
cgroup on /cgroup type cgroup (rw)

[root@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@sandbox ~]# mkdir /cgroup/lxc/host1
mkdir: cannot create directory `/cgroup/lxc/host1': Invalid argument

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

[root@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@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


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to