[SOLVED] Enable NFS on container.

ninelynx

New Member
May 21, 2018
5
0
1
32
Hi all.
I have a little problem while I try to mount a NFS on my container.
First of all, I try to mount doing:

mount -t nfs 192.168.150.5:/exports/media /mnt/media

Then it returns that I no have access to this server. I try it doing in a VM on the same net and it works.
So, searching in internet i found that it need be enabled on container configuration.

So I try to do a bind mount with the proxmox and the container, it works, but now I can't migrate because I have a bind mount there.

Someone knows how to enable NFS on the containers and be able to migrate to other proxmox nodes?

Thanks a lot!!

root@proxmox1:~# pveversion -v
proxmox-ve: 5.1-32 (running kernel: 4.13.13-2-pve)
pve-manager: 5.1-41 (running version: 5.1-41/0b958203)
pve-kernel-4.13.13-2-pve: 4.13.13-33
libpve-http-server-perl: 2.0-8
lvm2: 2.02.168-pve6
corosync: 2.4.2-pve5
libqb0: 1.0.1-1
pve-cluster: 5.0-19
qemu-server: 5.0-18
pve-firmware: 2.0-4
libpve-common-perl: 5.0-25
libpve-guest-common-perl: 2.0-16
libpve-access-control: 5.0-8
libpve-storage-perl: 5.0-17
pve-libspice-server1: 0.12.8-3
vncterm: 1.5-3
pve-docs: 5.2-4
pve-qemu-kvm: 2.11.1-5
pve-container: 2.0-18
pve-firewall: 3.0-5
pve-ha-manager: 2.0-5
ksm-control-daemon: 1.2-2
glusterfs-client: 3.8.8-1
lxc-pve: 3.0.0-3
lxcfs: 3.0.0-1
criu: 2.11.1-1~bpo90
novnc-pve: 0.6-4
smartmontools: 6.5+svn4324-1
zfsutils-linux: 0.7.8-pve1~bpo9
 
I was running this config for 1 or 2 years now, but now when I updated the proxmox server, this ist not working any more (pve-manager 5.2-10).
The last update added the line:

mount fstype=cgroup2 -> /sys/fs/cgroup/**,

to /etc/apparmor.d/lxc/lxc-default-cgns and since that the nfs mount in the container is not working any more. Do anyone have any suggestions for solving that?