Share a host folder to VM: NFS or virtiofs?

Andre_x

Active Member
Feb 15, 2021
33
3
28
42
Hi all,
I've setup a SnapRAID+MergerFS folder in the Proxmox host and I need to access it from a VM.
What's the best way to do it? NFS or virtiofs?
 
I'm going crazy with NFS!
I've created the share like this/mnt/pool/var_VM_docker/ 172.31.0.0/24(rw,sync,no_subtree_check) (/etc/exports)
but in Proxmox when I try to add a NFS drive I get:
create storage failed: mount error: mount.nfs: access denied by server while mounting 172.31.0.1:/mnt/pool/var_VM_docker (500)

If I try to mount it in CLI with: sudo mount -t nfs -o nfsvers=3 -vvvv 172.31.0.1:/mnt/pool/var_VM_docker /mnt/test
I get:
Code:
mount.nfs: timeout set for Mon Apr 15 19:07:11 2024
mount.nfs: trying text-based options 'nfsvers=3,addr=172.31.0.1'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 172.31.0.1 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 172.31.0.1 prog 100005 vers 3 prot UDP port 41067
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 172.31.0.1:/mnt/pool/var_VM_docker

172.31.0.1 is a bridge I've created in Proxmox just for this share. I've tried it with 127.0.0.1 (both in the export and in the mount, but I get the same error).
I can telnet to port 2049 on that IP.

What the heck am I doing wrong?