Ubuntu – Virtualbox guestaddition version from VM client

aptguest-additionsvirtualbox

Sometimes Ubuntu behave weird, which might be because because it runs within Virtualbox as a client OS.

I want to detect if Virtualbox guestaddition is installed, from within the VM client, and which version it is.

On the server it can be detected using the Virtualbox API, but I want to be able to detect it on the VM client itself.

Virtualbox guest addition can be installed using statement how-do-i-install-guest-additions-in-a-virtualbox-vm:

sudo apt-get install virtualbox-ose-guest-x11

So apt-get must "know" about the installation. apt-get does not have a search function so I tried :

dpkg --list | grep virtualbox

with result :

bernard@bernard-vbox2:~$ dpkg --list | grep virtualbox
ii  unity-scope-virtualbox                    0.1+13.10.20130723-0ubuntu1                       all          VirtualBox scope for Unity
bernard@bernard-vbox2:~

Someting about Virtualbox, but not about Vbox guest addition

On my system I presume ( info source ) VBox guest addition is installed in

/opt/[VboxAddonsFolder]

The folder does exist on my system but I can not find a (general) method to retrieve the VBox guestaddition version.

On Takkat advise I installed VBox guest addition. My preference to do this in the terminal.

bash
sudo apt-get update
sudo apt-get install build-essential linux-headers-$(uname -r)
sudo apt-get install virtualbox-guest-x11

Installed with succes my guestadditions.

Best Answer

Virtual Box guest additions are installed as kernel modules. To see whether guest additions are installed, and to get information on the version we can issue:

modinfo vboxguest

This will give an output similar to this:

filename:       /lib/modules/3.13.0-24-generic/updates/dkms/vboxguest.ko
version:        4.3.10
license:        GPL
description:    Oracle VM VirtualBox Guest Additions for Linux Module
author:         Oracle Corporation

Virtual Box guest additions installed on this machine hence is version 4.3.10.