为用户创建cgroup的步骤:
sudo service cgmanager start
sudo cgm create all $USER
sudo cgm chown all $USER $(id -u $USER) $(id -g $USER)
cgm movepid all $USER $PPID
尝试启动容器:
lxc-start -n hola -P /home/edem/.local/share/lxc/ --logfile asdf --logpriority DEBUG
lxc-start: Permission denied - Could not create cgroup '/hola' in '/sys/fs/cgroup/perf_event'.
lxc-start: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/perf_event//edem
lxc-start: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/perf_event/
lxc-start: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/blkio//edem
lxc-start: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/blkio/
lxc-start: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/net_cls,net_prio//edem
lxc-start: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/net_cls,net_prio/
lxc-start: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/freezer//edem
lxc-start: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/freezer/
lxc-start: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/devices/user.slice/edem
lxc-start: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/devices/user.slice
lxc-start: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/cpu,cpuacct//edem
lxc-start: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/cpu,cpuacct/
lxc-start: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/cpuset//edem
lxc-start: Permission denied - cgroup_rmdir: failed to delete /sys/fs/cgroup/cpuset/
lxc-start: failed creating cgroups
lxc-start: failed to spawn 'hola'
lxc-start: The container failed to start.
lxc-start: Additional information can be obtained by setting the --logfile and --logpriority options.
如何解决?