1

I have a VirtualBox machine that runs ubuntu 16.04 lts. it is a desktop ubuntu and i use it for my web application developments. I want to have a folder in my host OS (windows 10) and put my project files in it so it should automatically move to /var/www directory of my ubuntu VM. I searched a lot but there is something named Synced folders in vagrant that looks like it. but problem is i cant run vagrant on a existing VM that manually created by myself. vagrant will make its own VM from a Base Box. I dont know much about it but Here is My main Question:

Is it possible to use vagrant to have a synced folder on ubunto 16.04 VM created by myself not vagrant as dev environment and send files to it from a windows folder?

If it is not possible what is my best solution?

thanks.

0

You can place this line config.vm.synced_folder "./", "/var/www", create: true below you config.vm.box variable and the folder where is located Vagrant file will be mapped with /var/www/ directory of your Ubuntu OS. Don't forget to run vagrant reload.

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.