我正在尝试在特权容器中启用 apparmor,但由于某种原因失败了。我已经在主机内核(4.9)和用户空间(apparmor 2.11 版本)中启用了 apparmor。
systemctl status apparmor -l
日志
● apparmor.service - AppArmor initialization
Loaded: loaded (/lib/systemd/system/apparmor.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/apparmor.service.d
└─10-enable-in-container.conf
Active: failed (Result: exit-code) since Tue 2017-07-04 13:41:39 UTC; 45s ago
Docs: man:apparmor(7)
http://wiki.apparmor.net/
Process: 25 ExecStart=/sbin/apparmor_parser -B /etc/apparmor.d/cache/.ubercache (code=exited, status=13)
Main PID: 25 (code=exited, status=13)
Jul 04 13:41:38 ubuntu systemd[1]: Starting AppArmor initialization...
Jul 04 13:41:39 ubuntu apparmor_parser[25]: Error: Could not load profile /etc/apparmor.d/cache/.ubercache: Permission denied
Jul 04 13:41:39 ubuntu systemd[1]: apparmor.service: Main process exited, code=exited, status=13/n/a
Jul 04 13:41:39 ubuntu systemd[1]: Failed to start AppArmor initialization.
Jul 04 13:41:39 ubuntu systemd[1]: apparmor.service: Unit entered failed state.
Jul 04 13:41:39 ubuntu systemd[1]: apparmor.service: Failed with result 'exit-code'.
我也设置了lxc.aa_profile = unconfined
我的容器配置。
任何提示都将不胜感激!提前致谢!