当我运行配置文件时
配置文件
sudo lxc-start -n控制器-d
它给我这个错误
lxc-start:控制器:lxccontainer.c:wait_on_daemonized_start:842收到的容器状态为“ STOPPING”,而不是“ RUNNING”
lxc-start:控制器:tools / lxc_start.c:main:330容器启动失败
[lxc-start:控制器:tools / lxc_start.c:main:333要获取更多详细信息,请在前台模式下运行容器
lxc-start:控制器:tools / lxc_start.c:main:336可以通过设置--logfile和--logpriority选项获得其他信息
附加信息
lxc-start --version
3.0.3
uname -a
[Linux shahrukh-VirtualBox 3.12.74-031274-generic#201705101001 SMP Wed May 10 14:04:20 UTC 2017 x86_64 x86_64 x86_64 GNU / Linux]
事实证明,我的系统中存在apparmor
的旧配置文件,没有与apparmor
一起更新。只需解决此问题即可:
sudo -sH # become root
apt purge apparmor* # uninstall apparmor and its configs
apt install apparmor* # reinstall it
apparmor_status # check if apparmor is running
# If the above status shows 0 for every profile or other error
# check first if apparmor is activated in the kernel through grub
cat /sys/module/apparmor/parameters/enabled
# if the above doesn't return "Y", then activate it first
mkdir -p /etc/default/grub.d
echo 'GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT apparmor=1 security=apparmor"' \
| tee /etc/default/grub.d/apparmor.cfg
update-grub
reboot