Synced folders with NFS

Using NFS as a solution to syncing folders between the host and Vagrant machine can often offer performance benefits or better suit the environment you need.

Using NFS is very similar to the basic usage version of synced folders in Vagrant. Our Vagrant file just needs an extra parameter on the config.vm.synced_folders option:

config.vm.synced_folder ".", "/home/vagrant/files", type: "nfs"

We have added the type option with the value of nfs. For this to work, the OS within the Vagrant machine must support NFS. 

The host machine must also support NFS by running the NFS server daemon, which is the nfsd package. This comes pre-installed on macOS X, but you may be required to install it if your host machine is running Linux.

Vagrant NFS-synced folders do not work on Windows hosts. If you attempt to configure this in the Vagrantfile, Vagrant will just ignore it. If you're using VirtualBox as a provider, you will also need to configure private networking when using NFS. If you are using VMWare, you don't need to worry.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.19.56.45