I am on macOS and have installed virtualbox, vagrant & laravel homestead following the setup at https://laravel.com/docs/5.6/homestead.

My versions are:

  • macOS 10.14.4
  • vagrant 2.2.4
  • vagrant box : laravel/homestead 7.2.1
  • virtualbox 5.2.28r130011

When I run vagrant up I get the error:

homestead-7: Unable to mount one of your folders. Please check your folders in Homestead.yaml

My Homestead.yaml file is

    - map: ~/code
      to: /home/vagrant/code

    - map: firstproject.test
      to: /home/vagrant/code/public

When I go onto the virtual machine using vagrant ssh I can see that the files from my local have been synced on the virtual box to:


and not to


Why is this happening and how can I fix it?


Problem was caused by adding the code folder to the wrong place in the file system.

Folder was added to ~/Homestead/code instead of ~/code as per the Homestead.yaml file

    - map: ~/code
      to: /home/vagrant/code

Why did it sync to /vagrant on the VM?

from https://www.vagrantup.com/docs/synced-folders/index.html

"By default, Vagrant will share your project directory (the directory with the Vagrantfile) to /vagrant."

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.