I would like to install Virtualbox guest addition using the terminal. Because that is most easy to reproduce and to document. On the server I have Ubuntu 12.04.2. LTS I have Virtualbox 4.3.16

I have done so successfully in the recent past using :

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

Found on How do I install Guest Additions in a VirtualBox VM?

now I repeat doing so. Executing :

modinfo vboxguest

returns :

bernard@bernard-vbox2:~$ modinfo vboxguest
filename:       /lib/modules/3.11.0-22-generic/updates/dkms/vboxguest.ko
version:        4.2.16_Ubuntu
license:        GPL
description:    Oracle VM VirtualBox Guest Additions for Linux Module
author:         Oracle Corporation
srcversion:     A7E3594189A565BBB270EDB
alias:          pci:v000080EEd0000CAFEsv00000000sd00000000bc*sc*i*
vermagic:       3.11.0-22-generic SMP mod_unload modversions 

See virtualbox guestaddition version from VM client

All seems to work well, but when reboot I have a login screen and I seem to log in. But the screen change to black, and the system hang. Even the "send shutdown signal" has no effect. Only "power of machine" can stop the VM. Luckely I made a snapshot before installing Virtualbox guest additions. I tried twice, but with the identical result.

In both situation I had the same Ubuntu server version and Virtualbox server version. VM Ubuntu client is now 13.10 I do not not know the (possible different) previous VM ubuntu version.

Followed Sylvain Pineau advise with result :

DKMS: install completed.     
Setting up virtualbox-guest-x11 (4.2.16-dfsg-3ubuntu0.1) ...

Configuration file `/etc/X11/Xsession.d/98vboxadd-xclient'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.

2 Answers 2


Try to install the following packages in your VM:

sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11

Restart the VM and you should avoid the black screen.

  • I followed your advise which appear similar what I had before. The result is displayed above in my question. Should I keep my current version?
    – Bernard
    Jul 17, 2014 at 15:18
  • As written I tried twice, one with and one without saving my current version.
    – Bernard
    Jul 17, 2014 at 15:20
  • I choose NOT to keep my current version. Again a black screen. When trying to log out I got the message : /usr/lib/virtualbox/Virtualbox This program is blocking logout Does that help?
    – Bernard
    Jul 17, 2014 at 16:13

I believe that when you install the extension pack, you get the correct guest additions. And this way, all the versions should match because it's all from the same repository.

sudo apt install virtualbox
sudo apt install virtualbox-ext-pack
sudo modprobe vboxdrv
sudo apt install virtualbox-dkms
sudo apt install virtualbox-qt
modinfo vboxguest

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .