Book Image

Vagrant Virtual Development Environment Cookbook

Book Image

Vagrant Virtual Development Environment Cookbook

Overview of this book

Table of Contents (17 chapters)
Vagrant Virtual Development Environment Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Sharing Vagrant guest folders with the host


There are a number of cases where it is useful to share a folder between the host operating system and a Vagrant machine guest. When using Vagrant to develop software, shared folders can quickly become the primary advantage to use Vagrant. A shared folder allows us to execute code within a server environment, while having access to the full suite of development tools available for our host operating system.

Getting ready

Before setting up a shared folder scheme, it will be useful to plan how you would like to set up folder sharing. There are a few tips to keep in mind:

  • Sharing a folder will only work for folders that exist on the host operating system before starting Vagrant. This will also ensure that the contents of these folders remain even if the Vagrant machine is destroyed.

  • If you wish to share data generated by a Vagrant machine with the host, you will need to configure services to write to a previously existing shared folder.

  • Plan ahead when...