I have recently installed vagrant and red hat in windows 8 environment. I want to use my projects in windows drive in redhat running on vagrant machines. Is there a mechanism to copy paste or access project folders already present in windows environment inside vagrant virtual machines. I am running on Windows 8 with Red Hat 7 as the guest OS for Vagrant.
1 Answer
Synced folders basic usage, on your Vagrantfile look for (this will be commented out by default and you can use it by removing the # sign):
Vagrant.configure("2") do |config|
# other config here
config.vm.synced_folder "shared/", "/home/vagrant/shared"
end
The "shared" folder is within the same folder as your Vagrantfile
red-hat -
- shared/
- Vagrantfile
The "/home/vagrant/shared" folder will be the directory which is within the Red Hat box, all your files inside will be synced to and from the Windows folder. You can also move this shared folder for the box elsewhere i.e "/srv/website".