Nfs – How to mount an NFS share in a VM guest

nfsvirtual-machinesvirtualbox

We have a machine with Win7-x64 installed. On this machine, with VirtualBox, we're running a guest Fedora-x64. We've defined an NFS share on this Fedora instance. Here is the entry in /etc/exports:

/dvr 192.168.0.0/192.168.255.255(rw)

The ip address of the windows machine is, 192.168.1.100, the ip address of the Fedora guest is 192.168.1.110. The networking mode of the VM is set to be bridged networking.

Now, from another linux box, when we ping the Fedora guest (192.168.1.110), we get responses just fine. However, when we try to mount the nfs share, we get a "no route to host" error. The command we use is:

mount -t nfs 192.168.1.110:/dvr /mnt/test

Just to make sure there are no iptables issues, on the fedora guest, we did:

service iptables stop

and re-tried to mount, to no avail.

Any ideas what might be wrong in our setup? All these machines are connected to each other through a hub. A linksys router is configured as a DHCP server, from which all the machines grab an ip address.

Thanks.

Best Answer

Fedora uses firewalld as the firewall these days. Stopping iptables directly is not the correct way to stop the firewall. Try systemctl stop firewalld.service instead.

You have started the NFS service on the Fedora VM haven't you?

You'd do that by running systemctl start nfs.service on the VM.

If you've changed the /etc/exports file since starting the nfsd, then you need to either systemctl restart nfs.service or re-export filesystems with the exportfs -a command.