GuestAdditions seems to be installed (6.0.2) correctly, but not running

Posted on

Problem :

after upgrading VirtualBox to V.6.0.2, Vagrant V2.2.3 and homestead to release 8.0.0 each time I run vagrant up I get:

GuestAdditions seems to be installed (6.0.2) correctly, but not running

I tried to install GuestAdditions manually as below:

  • Download the latest GuestAdditions iso from https://download.virtualbox.org/virtualbox/6.0.2
  • Run VirtualBox and on VM settings I clicked Devices -> Insert Guest Additions CD Image
  • Log in to the guest server/VM
  • Mount the CDROM sudo mount /dev/cdrom /media/cdrom
  • Change into the mounted directory with the command cd /media/cdrom
  • Install the necessary dependencies with the command sudo apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r)
  • Change to the root user with the command sudo su
  • Install the Guest Additions package with the command ./VBoxLinuxAdditions.run
  • Reboot the VM

But I still get that warning:

GuestAdditions seems to be installed (6.0.2) correctly, but not running

Please advise

Solution :

After struggling for a longtime with GuestAdditions I decided to uninstall vagrant-vbguest plugin, and voilĂ ! It solved the issue.

vagrant plugin uninstall vagrant-vbguest

As you can see in the readme file for vagrant-vbguest
the plugin looks at the modules vboxguest and vboxsf in /proc/modules to decide whether the GuestAdditions are running:

Linux

This option is available on all Linux type installers.

  • :running_kernel_modules (default: ["vboxguest", "vboxsf"]) The list used to check for the “running” state.
    Each of these modules need to appear at the beginning of a line in /proc/modules.

In case you don’t use the vboxsf filesystem (for instance you use nfs) then you get this message
and the guest additions are reinstalled on every vagrant up.

The solution is to add the following line to your Vagrantfile:

config.vbguest.installer_options = { running_kernel_modules: ["vboxguest"] }

So now vboxsf is not used for checking the “running” state.

I use it as follows in my Vagrantfile:

if Vagrant.has_plugin?("vagrant-vbguest")
    config.vbguest.installer_options = { running_kernel_modules: ["vboxguest"] }
    config.vbguest.auto_update = true
end

Leave a Reply

Your email address will not be published. Required fields are marked *