Reputation: 41
I've set up a VM with VirtualBox with a RHEL7.5 distro. The network access mode for this VM is set as NAT.
When I try to mount a working remote NFS drive with mount command, I run into the following issue:
$ sudo mount -t nfs -o nfsvers=3 myserver.net:/vol/myserver_bin/build /build -o user=frperies -v
mount.nfs: timeout set for Fri Dec 6 11:17:19 2019
mount.nfs: trying text-based options 'nfsvers=3,addr=10.158.20.40'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 10.158.20.40 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 10.158.20.40 prog 100005 vers 3 prot UDP port 635
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting myserver.net:/vol/myserver_bin/build
Do you happen to know what goes wrong here ?
Thanks !
Upvotes: 1
Views: 1472
Reputation: 41
Well, at the end of the day I've found the fix for this issue and I'm posting it right here.
I've run the following command:
VBoxManage modifyvm "name of my VM" --nataliasmode1 sameports
as it suggested here:
https://serverfault.com/questions/891251/how-can-a-vbox-guest-access-nfs-shares?rq=1
My understanding is that NFS protocol does not support random ports when alias are used which is likely the default behavior of NAT core engine of VirtualBox. This is quickly explained here: https://www.virtualbox.org/manual/ch09.html#nat-adv-alias
By rebooting again my VM, NFS filesystem is properly mounted.
Upvotes: 2