Joined July 2013
·

Adam Cohen

Sydney, NSW
·
·

Posted to Use NFS to speed up your Vagrant over 1 year ago

@elbcoast wow, that's so much easier than my solution! Thanks for the tip!

Posted to Use NFS to speed up your Vagrant over 1 year ago

Just a note about using NFS with Vagrant, since I had great difficulty getting it to work with the correct permissions.

It seems that NFS mounts your shared directory from the host (desktop) on the vagrant VM using the SAME UID/GID found on the host. This means if your UID/GID on the desktop machine is, for example, 500/500, then the NFS share will be mounted on your Vagrant machine with the same UID/GID, which may not correspond to your vagrant user. In my case, my Vagrant user had a UID/GID of 501/501, since another user was already assigned the UID/GID of 500/500. This caused permission problems since the Vagrant user didn't have access to modify the files in the NFS share.

The easiest way to fix this is to reboot the Vagrant virtual machine into single user mode using the Oracle Virtualbox GUI application (enter the Grub boot menu when starting tup the VM, then append a space and the number 1 to the boot parameters), then modify the UID/GID of the vagrant user to match that of your desktop machine.

Achievements
50 Karma
0 Total ProTip Views