Sharing folders using Network File Systems
The previous recipe showed us how to share folders between a host operating system and a virtual machine guest using the hypervisor tool. This typically works for the majority of cases, but there are some situations where virtual machines can take advantage of networked file systems for ease of use or better performance.
Vagrant supports two different networked file systems:
- The Unix Networked File System (NFS)
- The Windows Server Message Block (SMB) protocol
Keep in mind that the protocol that you will use depends on your host operating system as a shared volume will be presented to the guest virtual machine. In this example, we'll demonstrate using VirtualBox on Mac OS X to share a folder between the host (OS X) operating system to an Ubuntu guest.
Before we begin this recipe, we'll address a bit of the reasons behind using the NFS over shared folder mechanism. The primary use case to use NFS is due to performance, and primarily the performance...