[lxc-users] Unable to launch unpriviledged containers on Desktop

Winael vinzjobard at ubuntu.com
Fri Mar 11 16:16:25 UTC 2016


Hi,

During my formation I learn that it is possible to create and launch
unpriviledged container.

So on my up-to-date Ubuntu Desktop 14.04 LTS, in my home folder I created
the ~/.config/lxc/default.conf

[code]
lxc.id_map = u 0 100000 65536
lxc.id_map = g 0 100000 65536
lxc.network.type = veth
lxc.network.link = lxcbr0
|/code]

Then I tried to create a container named webservice

[code]
lxc-create \
-t download \
-n webservice \
-o lxc-create-$(date +%Y%m%d%H%M%S).log \
-l TRACE \
-- \
-d ubuntu \
-r xenial \
--arch amd64
[/code]

Then when it's done I try to start the container :

[code]
lxc-start \
-n webservice \
-o lxc-start-$(date +%Y%m%d%H%M%S).log \
-l TRACE
[/code]

Unfortunately, the container won't start with this particular message :

[code]
lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 346 To get more details, run the container in
foreground mode.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by
setting the --logfile and --logpriority options.
[/code]

and when I take a look at the log file I can read :

[code]
lxc-start 20160311171257.911 ERROR    lxc_cgfs -
cgfs.c:lxc_cgroupfs_create:1007 - Permission denied - Could not create
cgroup '/user/1000.user/c2.session/lxc' in '/sys/fs/cgroup/systemd'.
      lxc-start 20160311171257.911 ERROR    lxc_cgfs -
cgfs.c:cgroup_rmdir:209 - Permission denied - cgroup_rmdir: failed to
delete /sys/fs/cgroup/systemd/user/1000.user/c2.session
      lxc-start 20160311171257.911 ERROR    lxc_cgfs -
cgfs.c:cgroup_rmdir:209 - Permission denied - cgroup_rmdir: failed to
delete /sys/fs/cgroup/hugetlb/user/1000.user/c2.session
      lxc-start 20160311171257.911 ERROR    lxc_cgfs -
cgfs.c:cgroup_rmdir:209 - Permission denied - cgroup_rmdir: failed to
delete /sys/fs/cgroup/perf_event/user/1000.user/c2.session
      lxc-start 20160311171257.911 ERROR    lxc_cgfs -
cgfs.c:cgroup_rmdir:209 - Permission denied - cgroup_rmdir: failed to
delete /sys/fs/cgroup/blkio/user/1000.user/c2.session
      lxc-start 20160311171257.911 ERROR    lxc_cgfs -
cgfs.c:cgroup_rmdir:209 - Permission denied - cgroup_rmdir: failed to
delete /sys/fs/cgroup/freezer/user/winael/0
      lxc-start 20160311171257.912 ERROR    lxc_cgfs -
cgfs.c:cgroup_rmdir:209 - Permission denied - cgroup_rmdir: failed to
delete /sys/fs/cgroup/devices/user/1000.user/c2.session
      lxc-start 20160311171257.912 ERROR    lxc_cgfs -
cgfs.c:cgroup_rmdir:209 - Permission denied - cgroup_rmdir: failed to
delete /sys/fs/cgroup/memory/user/winael/0
      lxc-start 20160311171257.912 ERROR    lxc_cgfs -
cgfs.c:cgroup_rmdir:209 - Permission denied - cgroup_rmdir: failed to
delete /sys/fs/cgroup/cpuacct/user/1000.user/c2.session
      lxc-start 20160311171257.912 ERROR    lxc_cgfs -
cgfs.c:cgroup_rmdir:209 - Permission denied - cgroup_rmdir: failed to
delete /sys/fs/cgroup/cpu/user/1000.user/c2.session
      lxc-start 20160311171257.912 ERROR    lxc_cgfs -
cgfs.c:cgroup_rmdir:209 - Permission denied - cgroup_rmdir: failed to
delete /sys/fs/cgroup/cpuset/user/1000.user/c2.session
      lxc-start 20160311171257.912 ERROR    lxc_start -
start.c:lxc_spawn:1043 - failed creating cgroups
      lxc-start 20160311171257.912 ERROR    lxc_start -
start.c:__lxc_start:1286 - failed to spawn 'webservice'
      lxc-start 20160311171303.421 ERROR    lxc_start_ui -
lxc_start.c:main:344 - The container failed to start.
      lxc-start 20160311171303.421 ERROR    lxc_start_ui -
lxc_start.c:main:346 - To get more details, run the container in foreground
mode.
      lxc-start 20160311171303.421 ERROR    lxc_start_ui -
lxc_start.c:main:348 - Additional information can be obtained by setting
the --logfile and --logpriority options.
[/code]

What did I miss ? could you help me to understand what I miss in my
configuration ? Thx in advance

Best Regards,
Winael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160311/8e05e28e/attachment.html>


More information about the lxc-users mailing list