Vagrant error : Failed to mount folders in Linux guest

后端 未结 21 2473
臣服心动
臣服心动 2020-11-27 08:46

I have some issues with Vagrant shared folders, my base system is Ubuntu 13.10 desktop.

I do not understand why I have this error is something that is not right conf

21条回答
  •  青春惊慌失措
    2020-11-27 09:23

    Update February 2016

    This took me hours to solve independently. Yes, this problem does still exist with latest Vagrant and Virtual Box installs:

    △  vagrant -v
    Vagrant 1.8.1
    △  vboxmanage -v
    5.0.14r105127
    

    The symptoms for me were messages something like:

    Checking for guest additions in VM... The guest additions on this VM do not match the installed version of VirtualBox!

    followed by a failure to mount NFS drives.

    1). Install the vagrant-vbguest plugin.

    Depending on version of Vagrant you are using, issue one of the following commands:

    # For vagrant < 1.1.5
    $ vagrant gem install vagrant-vbguest
    
    # For vagrant 1.1.5+
    $ vagrant plugin install vagrant-vbguest
    

    Next, do vagrant halt, followed by vagrant up - chances are you still have issues.

    2). ssh into your guest and setup a soft link to the correct version of Guest Additions (here, 5.0.14).

    $ vagrant ssh
    
    $ sudo ln -s /opt/VBoxGuestAdditions-5.0.14/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions
    $ exit
    
    $ vagrant reload
    

    You should be all good. By default, the mounted drive on guest is at /vagrant

    Final comment:

    IF you still have problems related to mounting NFS drives, then here is a workaround that worked for me. I had a vagrantfile with config something like:

    Simply remove the mount type information, and slim down the mount_options settings so they work universally. Vagrant will now automatically choose the best synced folder option for your environment.

提交回复
热议问题