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

Tony Su tonysu at su-networking.com
Wed Aug 7 18:01:57 UTC 2013


It's my understanding that if you're running LXC on a distro that
implements systemd (eg latest Fedora, openSUSE), then the cgroups are
pre-built... You literally only need to start creating your
Containers.

The same should likely be true if you launch practically anything ad
hoc in systemd, even if you didn't explicitly create a cgroup for a
particular app, when an app launches a cgroup is supposed to be
created dynamically which would hold any/all child processes (eg
sub-applications).

AFAIK Centos today does not implement systemd by default (but likely
is an option). There were strong indications the last major release
would have implemented systemd but backed away at the last second for
unknown (that I've heard) reasons.

HTH,
Tony

On Wed, Aug 7, 2013 at 8:11 AM, Ethier, Michael <methier at cgr.harvard.edu> wrote:
> Hi Sean, thanks....looks like with 0.7.5, it works :)
>
> BTW, when I am in the container I can't seem to exit it on the console. I tried Ctrl+a q and
> it just send it to the login prompt. Is this a bug ?
>
> And when I try to edit a file with emacs inside the container I get:
>
> [root at host1 ~]# emacs /etc/resolv.conf
> emacs: Could not open file: /dev/tty[root at host1 ~]#
>
> I have a mis-config somewhere ?
>
> Thanks for you help,
> Mike
>
>
> -----Original Message-----
> From: Sean Pajot [mailto:sean.pajot at execulink.com]
> Sent: Wednesday, August 07, 2013 10:13 AM
> To: Ethier, Michael
> Cc: lxc-users at lists.sourceforge.net
> Subject: Re: [Lxc-users] lxc-start: Error creating cgroups
>
> 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.
>
> ------------------------------------------------------------------------------
> 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 at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users




More information about the lxc-users mailing list