Share a host folder to VM: NFS or virtiofs?

Andre_x

Member
Feb 15, 2021
33
3
13
41
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?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!