vagrant : Failed to mount folders in Linux guest, “vboxsf” file system is not available?

前端 未结 4 1614
借酒劲吻你
借酒劲吻你 2021-01-12 04:34

I have VirtualBox 4.3.10 and Vagrant 1.4.3 installed on my Ubuntu 14.04 64 bit Desktop.

Earlier, worked with

相关标签:
4条回答
  • 2021-01-12 04:50

    Apparently there is a bug in the VirtualBox Guest Additions 4.3.10 installer: https://www.virtualbox.org/ticket/12879

    There seems to be a simple workaround to this, by creating a symbolic link within Vagrant-VM:

    sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions \
    /usr/lib/VBoxGuestAdditions
    

    You could add this to your provisioning configuration to make sure you don't hit the bug again:

    NEWEST_VBOXGUESTADDITIONS_DIR=`find /opt/ -maxdepth 1 -mindepth 1 -name "VBoxGuestAdditions-*" | tail -n 1`;
    if [[ ! -d "/usr/lib/VBoxGuestAdditions" && -n "$NEWEST_VBOXGUESTADDITIONS_DIR" ]];
    then
        ln -s ${NEWEST_VBOXGUESTADDITIONS_DIR}/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions
    fi
    
    0 讨论(0)
  •  vagrant plugin install vagrant-vbguest
    

    worked well for me (Virtual Box 5.0.22, Vagrant 1.8.4). It took muck longer to provision initially because the plugin downloaded gcc and a bunch of other tools before linking the guest additions .iso to the correct place.

    0 讨论(0)
  • 2021-01-12 04:56

    In my case, this error was fixed by rebuilding the kernel on the guest machine with sudo service vboxadd setup.

    0 讨论(0)
  • 2021-01-12 05:04

    This line of code in "Vagrantfile" was the solution for me:

    config.vm.synced_folder "./", "/vagrant", id: "vagrant-root", type: "nfs"
    
    0 讨论(0)
提交回复
热议问题