How to install Virtualbox Guest Additions on Debian 8, Debian 9

Hello, welcome to Manjaro.Site. If you are planning to install Debian 8 or Debian 9 on Virtualbox, you may need to install the Virtualbox Guest Additions afterward. This tutorial is going to show you hot to install Virtualbox Guest Additions on Debian 8 and Debian 9. Read this post if you want to install Virtualbox on Debian 9.

Why we need to install Guest Additions?

If the Guest Additions is not enabled on the guest machine, you won’t get the most of the guest OS. For example, you can not enter the full screen mode, clipboard sharing feature between host and guest machine is disabled and many more. So, installing Guest Additions is a mandatory task. 

Steps to Install Virtualbox Guest Additions on Debian 

Prequisites

There are some things we need to prepare before we install the Guest Additions. 

  1. Update and upgrade Debian
  2. Install additional packages
  3. Building supported Kernel

Update and Upgrade Debian system

Log in to your Debian and open Terminal console to perform update. 

sudo apt update && sudo apt upgrade

Install additional packages

Without these packages installed, the Guest Additional install process will failed

sudo apt install build-essential module-assistant

Output example:

root@debian:/home/dhani# apt install build-essential module-assistant
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  dpkg-dev fakeroot g++ g++-4.9 gcc gcc-4.9 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl
  libasan1 libatomic1 libc-dev-bin libc6-dev libcilkrts5 libfakeroot libgcc-4.9-dev libitm1 liblsan0
  libstdc++-4.9-dev libtsan0 libubsan0 linux-libc-dev manpages-dev
Suggested packages:
  debian-keyring g++-multilib g++-4.9-multilib gcc-4.9-doc libstdc++6-4.9-dbg gcc-multilib autoconf automake libtool
  flex bison gdb gcc-doc gcc-4.9-multilib gcc-4.9-locales libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg
  libasan1-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libquadmath0-dbg glibc-doc libstdc++-4.9-doc
The following NEW packages will be installed:
  build-essential dpkg-dev fakeroot g++ g++-4.9 gcc gcc-4.9 libalgorithm-diff-perl libalgorithm-diff-xs-perl
  libalgorithm-merge-perl libasan1 libatomic1 libc-dev-bin libc6-dev libcilkrts5 libfakeroot libgcc-4.9-dev libitm1
  liblsan0 libstdc++-4.9-dev libtsan0 libubsan0 linux-libc-dev manpages-dev module-assistant
0 upgraded, 25 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,401 kB/37.6 MB of archives.
After this operation, 97.4 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Build Kernel Module

Now we need to prepare our system to build the kernel module

sudo m-a prepare

Output example

root@debian:/home/dhani# m-a prepare
Getting source for kernel version: 3.16.0-4-amd64
apt-get install linux-headers-3.16.0-4-amd64 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  cpp-4.8 gcc-4.8 libasan0 libgcc-4.8-dev linux-compiler-gcc-4.8-x86 linux-headers-3.16.0-4-common linux-kbuild-3.16
Suggested packages:
  gcc-4.8-locales gcc-4.8-multilib gcc-4.8-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan0-dbg
  libtsan0-dbg libquadmath0-dbg
The following NEW packages will be installed:
  cpp-4.8 gcc-4.8 libasan0 libgcc-4.8-dev linux-compiler-gcc-4.8-x86 linux-headers-3.16.0-4-amd64
  linux-headers-3.16.0-4-common linux-kbuild-3.16
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,368 kB/16.7 MB of archives.
After this operation, 61.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Install Guest Additions

Now, go to Devices | Install Guest Additions from your Virtualbox menu. 

Click the CDROM drive on the left panel as above. You will see list of the files inside the Guest Additions CD ROM/ISO. Now right click and select Open in Terminal. Install the Guest Additions with the following command

sudo ./VBoxLinuxAdditions.run

Wait until the installation completed. Reboot Debian afterward.

After reboot, your Guest Additions should be working and now you can enjoy Debian with Full Version supports. 

install virtualbox guest additions on Debian

Thanks for reading this How to install Virtualbox Guest Additions on Debian. See you on the next tutorial.

1 Trackback / Pingback

  1. Refresh Your Debian 9 Desktop with this Mac OS X Theme | Manjaro dot site

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.