boywijnmaalen
9/10/2015 - 10:02 AM

Mount a NFS share from a local hosted VM via CLI

Mount a NFS share from a local hosted VM via CLI

## 1. add these ports to the nat forwarder in VirtualBox (You can look them up in "/etc/sysconfig/iptables")


udp 2049
tcp 2049
udp 111
tcp 111
udp 32803
tcp 32803

# port '32803' must manually be set in  /etc/default/nfs-kernel-server
# (don't forget to restart the service)

# Optionally for Virtualbox:

udp 892
tcp 892
udp 875
tcp 875
udp 662
tcp 662

## 2. connect to the local hosted share via CLI

$ sudo mkdir -p /Volumes/localhost && sudo mount_nfs -o resvport 127.0.0.1:/var/www/sites /Volumes/localhost/