I'm trying to get shared folders to work with my Vagrant box (host is Ubuntu 16.04, guest is CentOS 6). When I bring it up the machine Vagrant complains that:

default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default: Guest Additions Version: 4.3.26
default: VirtualBox Version: 5.1

So I'm trying to upgrade guest additions so they fit the VBox version. I select Devices > Insert Guest Additions Cd Image...Nothing happens but I can see it's mounted. Now I'm supposed to navigate to /media and run sudo ./VBoxLinuxAdditions.run, but I can't find anything relevant in /media. I tried the solution suggested here, but typing sudo mount /dev/sr0 vbox/ got me mount: special device /dev/sr0 does not exist.

Any ideas?

| improve this question | | | | |
  • You need to download and install Guest Additions v. 5.1 – SΛLVΘ Oct 10 '16 at 20:22
  • I know, that's what I'm trying to do, but even though the CD is mounted I can't find the files. – Johnny Oct 10 '16 at 20:53

Since this still doesn't have an answer:

  1. Install dotless' vbguest vagrant plugin
  2. Download the respective virtualbox guest additions image from http://download.virtualbox.org/virtualbox/ (save it as "VBoxGuestAdditions.iso" to the same folder where your Vagrantfile is located)
  3. On your host, in the folder where your Vagrantfile is located (and now VBoxGuestAdditions.iso as well) execute: $ vagrant vbguest --do install --iso VBoxGuestAdditions.iso

If you get an error:

VirtualBox Guest Additions installer
You appear to have a version of the VBoxGuestAdditions software
on your system which was installed from a different source or using a
different type of installer.  If you installed it from a package from your
Linux distribution or if it is a default part of the system then we strongly
recommend that you cancel this installation and remove it properly before
installing this version.  If this is simply an older or a damaged
installation you may safely proceed.

Do you wish to continue anyway? [yes or no]

Cancelling installation.
An error occurred during installation of VirtualBox Guest Additions 5.1.0. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
Redirecting to /bin/systemctl start vboxadd.service
Failed to start vboxadd.service: Unit not found.

You might have a “VBoxGuestAdditions-x.x.x” folder in your /opt directory on the guest system, indicating that VBoxGuestAdditions had been installed before and not with the vbguest Plugin. For me, the folder was empty. Remove the folder and rerun vbguest.

See these links for more troubleshooting info:

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.