13
votes

I have downloaded a Vagrantfile, but when i run vagrant up in terminal the following message appears:

Bringing machine 'default' up with 'virtualbox' provider... There are errors in the configuration of this machine. Please fix the following errors and try again:

vm: * The host path of the shared folder is missing: ~/Sync

OBS.: Using Ubuntu 14.10


I created a folder named Sync in my home.

4
Did you ever figure out this answer ?cyb3rZ
Can you share your Vagrantfile?Luke Peterson

4 Answers

9
votes

According to Vagrant docs host path must be either absolute (i.e. /home/user/Sync) or relative to project root (place where your Vagrantfile is).

Relative to project root means if your Vagrantfile resides in /home/user/MyProject then setting up path as "Sync" will create share from /home/user/MyProject/Sync.

Ref: http://docs.vagrantup.com/v2/synced-folders/basic_usage.html

1
votes

In my case it was a space at the end of the path in config.yaml:

 source: '/Users/h/Packt/Code '

I've deleted this space and it's working now.

1
votes

If you are using Vagrant and Windows Subsystem for Linux then you can solve the issue creating a symlink

ln -s /mnt/c/Users/user/project ~/project
  • /mnt/c/Users/user/project should match the Vagrant project in your Windows machine.
  • ~/project should match the path that is missing.

Note, that you may need to create any intermediary directories.

0
votes

I assumed you are in linux or mac. Type in "pwd" and enter in the terminal where Homestead.yml is.

Mine is "/home/idhamhafidz/Code/opp190-ama"

Then go to your Homestead.yml and edit the folders section like in the image below: enter image description here

Then quit edit Homesteady.yml and re-run vagrant up again.