Vagrant: The host path of the shared folder is missing
I'm following the install process you describe in the early videos. Things go smoothly until right after I edit the .yaml file an attempt "vagrant up' in the Homestead directory.
I get this:
[02:25 PM]~/Homestead $ vagrant up 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: /Users/james/Homestead/Projects
You may need to create that folder, as long as you are following my paths...
@hamptonpaulk Thanks for the help. I resolved this: It was VirtualBox. VirtualBox was looking for VMs in the wrong place. I changed preferences through the GUI and--voila--vagrant up and vagrant ssh worked perfectly. Whew.
Julien Gascard12,818 Points
Hi, just to be sure, are you on OS X or on a Linux distro ? Because the path on Linux is a bit different : /Users/yourname/path -> /home/yourname/path . Hope it helps...
Daniel White2,558 Points
@JamesGill I think I'm having the same issue as you. Im getting the error message: "vm:
- The host path of the shared folder is missing: ~/Code"
What did you do to fix this issue? I do great until I do vagrant up. I have added the project folders and updated the .yaml file but still get an error.
Is this a virtual box issue? Should I change the vm path under preferences? If so where should I change it to?
Dan Donche5,974 Points
I have this same issue. I don't understand what is happening. This is what I have in my yaml file:
folders: - map: ~/Code to: /c/Users/Student/homestead/Code sites: - map: laravel.dev to: /c/Users/Student/homestead/Code/laravel-test/public
That is how my directory is set up. Obviously the Code directory exists. What I'm confused about is that it's asking for the path to the shared folder.
Stephen Printup43,074 Points
Ok, so I think I messed up-
I found this link: http://stackoverflow.com/questions/27243418/vagrant-up-command-fails
and ran $ vagrant init hashicorp/precise32
and now my command line reads vagrant@precise32:~$ instead of vagrant@homestead:~$ like in the video. I think I've installed an alternative virtual box or something, but I really have no idea. Any help to get me back on track would be appreciated.
My initial problem was that I was getting errors when running vagrant up (unable to find base or code, etc.) The current Laravel file structure is a bit different than in the video and the homestead.yaml file is in homestead/src/stubs instead of in just homestead.
Finally, I initialized vagrant like 3 times (deleting the only vagrant file I saw every time), but am still unclear on where I should put it. Does it now go in homestead/src/stubs or just in homestead. Will the vagrant up command create the code file and base file? Hmm, thanks for any help you can provide.
FYI my homestead.yaml file reads:
ip: "10.0.10.10" memory: 2048 cpus: 1 provider: virtualbox authorize: /Users/stephenprintup/.ssh/id_rsa.pub keys: - /Users/stephenprintup/.ssh/id_rsa folders: - map: ~/Users/stephenprintup/Homestead/Projects to: /Users/stephenprintup/vagrant/Sites sites: - map: laravel.dev to: /home/vagrant/Sites/laravel-basics/public databases: - homestead variables: - key: APP_ENV value: local
This worked for me: after making changes to Homestead.yaml, you might have to run
bash init.sh once more. It will ask if you want to overwrite some files (including Homestead.yaml). Say yes to everything, and you should be good to go.