vagrantvagrant-plugin

"/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

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.


Solution

  • 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: