I'm having trouble starting a xenial lxc container on my trusty machine.

I had no problems installing the container (by following this guide, which also allowed me to create and start some other trusty containers successfully), but when I try to start it I get this error:

async@riff:~$ sudo lxc-start -n jenkins-slave-xenial
Failed to mount cgroup at /sys/fs/cgroup/systemd: Permission denied
[!!!!!!] Failed to mount API filesystems, freezing.
Freezing execution.

Based on an advice from the debian lxc wiki page, I tried to follow this advice. It changed the error, but did not fix it:

async@riff:~$ sudo lxc-start -n jenkins-slave-xenial
lxc-start: cgmanager.c: cgm_setup_limits: 1378 call to cgmanager_set_value_sync failed: invalid request
lxc-start: cgmanager.c: cgm_setup_limits: 1381 Error setting cgroup use:lxc/jenkins-slave-xenial limit type use
lxc-start: start.c: lxc_spawn: 952 failed to setup the cgroup limits for 'jenkins-slave-xenial'
lxc-start: start.c: __lxc_start: 1121 failed to spawn 'jenkins-slave-xenial'
lxc-start: lxc_start.c: main: 341 The container failed to start.
lxc-start: lxc_start.c: main: 345 Additional information can be obtained by setting the --logfile and --logpriority options.

I'm lost here. Am I missing something to make this work?


You need to install lxc from trusty-backports.

i.e. sudo apt install -t trusty-backports lxc lxc-templates

You'll want to stop your existing hung container (lxc-stop --kill --name jenkins-slave-xenial) and then try starting it again.

See https://github.com/lxc/lxc/issues/685 and https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1590547 for further details.


Fixed this issue by adding to the container config:

lxc.mount.auto = cgroup:mixed

Ubuntu 14.04.6 LTS, Trusty Tahr, packages:

  • lxc 2.0.8-0ubuntu1~14.04.1
  • lxc-templates 2.0.8-0ubuntu1~14.04.1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.