0

I have unprivileged LXC's setup on my server, when trying to start one of my LXC's I get this error:

lxc@web3:/sys/fs/cgroup$ lxc-start -n brainfever
WARN: could not reopen tty: Permission denied
WARN: could not reopen tty: Permission denied
WARN: could not reopen tty: Permission denied
WARN: could not reopen tty: Permission denied
WARN: could not reopen tty: Permission denied
lxc_container: Permission denied - Could not create cgroup '/user.slice/brainfever-1' in '/sys/fs/cgroup/devices'.
lxc_container: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/freezer/
lxc_container: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/devices/user.slice
lxc_container: failed creating cgroups
lxc_container: failed to spawn 'brainfever'
lxc_container: The container failed to start.
lxc_container: Additional information can be obtained by setting the --logfile and --logpriority options.



lxc@web3:/sys/fs/cgroup$ ls -l
total 0
dr-xr-xr-x 9 root root  0 Feb 22 15:26 blkio
drwxr-xr-x 3 root root 80 Feb 22 15:26 cgmanager
lrwxrwxrwx 1 root root 11 Feb 22 14:53 cpu -> cpu,cpuacct
dr-xr-xr-x 9 root root  0 Feb 22 15:26 cpu,cpuacct
lrwxrwxrwx 1 root root 11 Feb 22 14:53 cpuacct -> cpu,cpuacct
dr-xr-xr-x 9 root root  0 Feb 22 15:26 cpuset
dr-xr-xr-x 5 root root  0 Feb 22 15:26 devices
dr-xr-xr-x 2 lxc  lxc   0 Feb 22 16:35 freezer
dr-xr-xr-x 9 root root  0 Feb 22 15:26 memory
lrwxrwxrwx 1 root root 16 Feb 22 14:53 net_cls -> net_cls,net_prio
dr-xr-xr-x 9 root root  0 Feb 22 15:26 net_cls,net_prio
lrwxrwxrwx 1 root root 16 Feb 22 14:53 net_prio -> net_cls,net_prio
dr-xr-xr-x 9 root root  0 Feb 22 15:26 perf_event
dr-xr-xr-x 9 root root  0 Feb 22 15:26 pids
dr-xr-xr-x 5 root root  0 Feb 22 15:26 systemd

List of LXC's:

lxc@web3:/sys/fs/cgroup$ lxc-ls
artservice_photo_contest  brainfever                happyglass                
meltingspot               mmaccess                  natureandspirit 

The LXC is stopped.

lxc@web3:~$ lxc-info -n brainfever
Name:           brainfever
State:          STOPPED

If more information is needed, I will edit the question.

  • What happens when you run the commands with sudo? – Raman Sailopal Feb 22 '18 at 12:09
  • It is setup as the user lxc, running it with sudo will not find the LXC. – Hunter.S.Thompson Feb 22 '18 at 12:11
  • And there's no selinux or apparmor implementations interfering? – Raman Sailopal Feb 22 '18 at 12:12
  • Nope its a debian 8 server with selinux not installed. – Hunter.S.Thompson Feb 22 '18 at 12:14

Your Answer

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

Browse other questions tagged or ask your own question.