From the course: Learning Vagrant

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Vagrant synced folders

Vagrant synced folders - Vagrant Tutorial

From the course: Learning Vagrant

Start my 1-month free trial

Vagrant synced folders

- [Instructor] Most hypervisors have the ability to synchronize a folder on the host operating system to a folder in a virtual machine. The Vagrant synced folder feature exposes those hypervisor features and the synced folder section of the Vagrantfile is used to configure it. We'll use the vagrant-dev box we created earlier. If the box is not already running, open the vagrant-dev directory with VS Code. Then open the integrated terminal and start the box with vagrant up. First, we'll look at the default synced folder behavior, then we'll make a change to the Vagrantfile to see how that affects the box. Enter the following command into the Vagrant terminal, vagrant ssh. This will establish a connection to the running box. Now let's take a look at the contents of the root folder, ls space forward slash. We're currently in the home folder for the Vagrant account so we add the forward slash to list the contents of the root folder of the primary volume. This would be the C Drive for us…

Contents