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.

  • Just to clarify, you're running on Windows with Red Hat as the guest OS for your Vagrant box? – sudo Oct 4 '18 at 7:50
  • yes...................... – ss321c Oct 4 '18 at 11:12

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"

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

Vagrant Synced Folders Basic Usage

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.