Refresh
Fixed in VirtualBox 5.1.22.
( https://www.virtualbox.org/ticket/16670 )
Original answer
In my case, the symbolic link inside the virtual machine was wrong. Log in to VM:
$ vagrant ssh
Then:
$ ls -lh /sbin/mount.vboxsf lrwxrwxrwx 1 root root 49 Apr 19 14:05 /sbin/mount.vboxsf -> /opt/VBoxGuestAdditions-5.1.20/other/mount.vboxsf
This link does not work. When you look inside /opt/VBoxGuestAdditions-5.1.20/, you see that the subfolder "other" does not exist. This line fixes this:
$ sudo ln -sf /opt/VBoxGuestAdditions-*/lib/VBoxGuestAdditions/mount.vboxsf /sbin/mount.vboxsf
Now exit the VM:
$ exit
And check if it works for you:
$ vagrant reload
But I canβt fix the link because /sbin/mount.vboxsf does not exist inside my box!
If the link /sbin/mount.vboxsf does not exist in the first place, then VBoxGuestAdditions cannot be installed. This can happen if you did not download the corresponding VirtualBox extension pack after updating VirtualBox (v5.2.18 and higher should download it automatically during Virtualbox updates). You can do it now:
- Stop all your running virtual machines.
- Open the VirtualBox program.
- Launch the VirtualBox extension package download and install it.
- If you are not asked if you want to download the VirtualBox extension pack, open β File β Check for Updates to bring up the download dialog.
If there was no update for the VirtualBox extension, it is possible that VBoxGuestAdditions cannot be installed because the installer displays a message and the vagrant vbguest plug-in cannot request a response (this is βfixedβ in vbguest v0.15.0 ). You can see this in the output of "vagrant up". There should be a line similar to this:
Do you wish to continue? [yes or no]
In this case, you can run the installer manually. To do this, run the window:
$ vagrant up
Then run vbguest to retry the installation, but then leave the mounted VBoxGuestAdditions ISO as follows:
$ vagrant vbguest --do install --no-cleanup
Enter the box:
$ vagrant ssh
Launched the installer manually:
$ sudo /mnt/VBoxLinuxAdditions.run
Last hope: do it yourself!
If none of the above helps, try installing the guest add-ons manually:
cd /opt sudo wget -c http://download.virtualbox.org/virtualbox/5.1.28/VBoxGuestAdditions_5.1.28.iso -O VBoxGuestAdditions_5.1.28.iso sudo mount VBoxGuestAdditions_5.1.28.iso -o loop /mnt sudo sh /mnt/VBoxLinuxAdditions.run