[Lxc-users] LXC with multiple cgroup mount points

Ramez Hanna rhanna at informatiq.org
Fri Feb 3 10:09:10 UTC 2012

On Sat, Jan 28, 2012 at 2:56 PM, Jimmy THRASIBULE
<thrasibule.jimmy at gmail.com> wrote:
> Hi,
> I'm running Fedora 16 and I'm trying to run an LXC container. I think
> that my problem comes from how Fedora mount the different cgroup
> subsystems. Each subsystem is mounted on its own file system:
> tmpfs on /sys/fs/cgroup type tmpfs
> (rw,nosuid,nodev,noexec,relatime,seclabel,mode=755)
> cgroup on /sys/fs/cgroup/systemd type cgroup
> (rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,clone_children,name=systemd)
> cgroup on /sys/fs/cgroup/cpuset type cgroup
> (rw,nosuid,nodev,noexec,relatime,cpuset)
> cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup
> (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
> cgroup on /sys/fs/cgroup/memory type cgroup
> (rw,nosuid,nodev,noexec,relatime,memory)
> cgroup on /sys/fs/cgroup/devices type cgroup
> (rw,nosuid,nodev,noexec,relatime,devices)
> cgroup on /sys/fs/cgroup/freezer type cgroup
> (rw,nosuid,nodev,noexec,relatime,freezer)
> cgroup on /sys/fs/cgroup/net_cls type cgroup
> (rw,nosuid,nodev,noexec,relatime,net_cls)
> cgroup on /sys/fs/cgroup/blkio type cgroup
> (rw,nosuid,nodev,noexec,relatime,blkio)
> cgroup on /sys/fs/cgroup/perf_event type cgroup
> (rw,nosuid,nodev,noexec,relatime,perf_event)
> When I try to start my container, here is what I get:
> # lxc-start -f config -n generic
> lxc-start: open /sys/fs/cgroup/systemd/generic/devices.deny : No such
> file or directory
> lxc-start: failed to setup the cgroups for 'generic'
> lxc-start: failed to setup the container
> lxc-start: invalid sequence number 1. expected 2
> lxc-start: failed to spawn 'generic'
> You can find the full log file enclosed with the container configuration file.
> LXC seems to pick the first cgroup subsystem it can get but as that
> subsystem does not allow the full cgroup operations, LXC fails to
> start the container. I cannot mount a full cgroup file system as one
> is already mounted:
> # mount -t cgroup lxc /cgroup
> mount : lxc is already mounted or /cgroup is busy
> What can I do in this kind of situation? Can I specify to LXC where it
> can find all the cgroup subsystems?
> ___
> Jimmy THRASIBULE <thrasibule.jimmy at gmail.com>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users

which lxc version are u using?
I can get past this step but I have other issues related to systemd or
at least that's what i concluded
I am using the latest GIT version
the one problem i get related to multiple cgroups is the stoping
when i stop a container it fails to remove all the cgroups ctreated
so I need to do
cd /sys/fs/cgroup
for cg in $(find -type d -name $container_name); do find $cg -type d
-exec rmdir -p '{}' \;;done


More information about the lxc-users mailing list