Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"/vagrant" shared folder does not exist

When I create a virtual machine through vagrant, and ssh into the machine the "/vagrant" folder does not exist.

Currently Running the following

  • Host OS: Ubuntu 16.04
  • Virtualbox: Version 5.0.18_Ubuntu r106667
  • Guest Additions: 5.0.18
  • Vagrant Version: 1.8.1
  • Vagrant vb-guest plugin with the Vagrant 1.8.1 plugin patch from: https://github.com/tobwilk/vagrant-plugin-v1.8.1-fix

Note there is no mention of "Mounting Shared Folders" when the machine boots up. The Vagrantfile is the standard file created from "vagrant init".

Any help on to why this may be happening would be much appreciated. Thanks.

like image 681
wc250 Avatar asked May 30 '16 02:05

wc250


1 Answers

make sure that in your Vagrantfile you dont have something

config.vm.synced_folder ".", "/vagrant", disabled: true

Also if you dont, force the default /vagrant folder to be shared

config.vm.synced_folder ".", "/vagrant"

when booting your VM, you should have logs like

==> default: Mounting shared folders...
    default: /vagrant => /Users/.....path to project directory

If nothing works, 2 things you can explore:

  • is sync_folder working with another folder definition ?
  • boot with debug option vagrant up --debug to see whats happening after Mounting shared folders
like image 193
Frederic Henri Avatar answered Oct 10 '22 05:10

Frederic Henri