Created
March 2, 2017 10:05
-
-
Save kevin39/aab9d8ff075e792eb0feb50fdcac5c61 to your computer and use it in GitHub Desktop.
NFSD on LXC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a new file "/etc/apparmor.d/lxc/lxc-default-with-nfsd" and paste in the following; | |
Code: | |
# Do not load this file. Rather, load /etc/apparmor.d/lxc-containers, which | |
# will source all profiles under /etc/apparmor.d/lxc | |
profile lxc-container-default-with-nfsd flags=(attach_disconnected,mediate_deleted) { | |
#include <abstractions/lxc/container-base> | |
# the container may never be allowed to mount devpts. If it does, it | |
# will remount the host's devpts. We could allow it to do it with | |
# the newinstance option (but, right now, we don't). | |
deny mount fstype=devpts, | |
mount fstype=nfsd, | |
mount fstype=rpc_pipefs, | |
mount fstype=cgroup -> /sys/fs/cgroup/**, | |
} | |
Then run this command to reload the profiles | |
Code: | |
apparmor_parser -r /etc/apparmor.d/lxc-containers | |
Finally at this line to your /etc/pve/lxc/CTID.conf | |
Code: | |
lxc.aa_profile = lxc-container-default-with-nfsd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment