Skip to content

Instantly share code, notes, and snippets.

@mowings
Last active March 8, 2020 11:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mowings/9782264 to your computer and use it in GitHub Desktop.
Save mowings/9782264 to your computer and use it in GitHub Desktop.
Set up NFS share from mac to Parallels Linux Guest

On the mac, edit /etc/exports and add a line like so:

"/Users/<username>/develop/" -network 10.211.55.0 -mask 255.255.255.0  -mapall=<username>

The network and mask parameters indicate what hosts we'll share with; in my case, this network is used by the parallels shared network adapter; yours may differ.

You may need to reload nfsd:

sudo nfsd update

And you can check to see that the mounts are indeed exported

showmount -e

On the Linux host, just install the nfs utilities and mount as you normally would. Something like:

mount -t nfs -o proto=tcp,port=2049 10.211.55.2:/Users/<username>/develop  /mnt/develop

The IP in this case is the ip the guest sees for the host. On a linux box, I just use the who command to get this.

Note that if you get a "bad superblock" or other error here, you probably neglected to install an nfs client, and are a big dummy. On ubuntu, you would do an apt-get install nfs-common. Non-apt distributions will differ.

@cgagon
Copy link

cgagon commented May 15, 2014

I'd prefer the term 'small dummy' so as not to offend the larger.

@coryf
Copy link

coryf commented May 20, 2014

If you want to have the mount automatically reattach on reboot:

sudo vim /etc/fstab

# add next line to end:
10.211.55.2:/Users/<username>/develop /mnt/develop nfs proto=tcp,port=2049

# then:
sudo mount -a

@coryf
Copy link

coryf commented Mar 14, 2016

I've had issues with caching and added this to end my fstab line: ,actimeo=1

10.211.55.2:/Users/<username>/source /home/<username>/source nfs proto=tcp,port=2049,actimeo=1

@silviucl
Copy link

I had issues when having the repos inside the Github directory mount.nfs: access denied by server while mounting.
Moved them one level up, in the Documents, and mount is successful now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment