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 ...

Get Vagrant Virtual Development Environment Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.