After installing Linux in a virtual machine, some time you must have faced issue with the screen size. In desktop version of any linux box you need to install guest additions in your VM. The Virtual Box Guest Additions for Linux are a set of device drivers and system applications which may be installed in the guest operating system.
To install them, go to
Device >> install Guest Additions
It will prompt you with options to auto-run setup. Click on Run and then enter your password to authenticate installation in your linux box.
It will start installation…. if incase it fails with error like highlighted below...
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.1.12 Guest Additions for Linux.........
VirtualBox Guest Additions installer
Removing installed version 4.1.12 of VirtualBox Guest Additions...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
Module compilation fails then this could be the reason.
Building the main Guest Additions module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions ...done.
Installing the Window System drivers
Warning: unknown version of the X Window System installed. Not installing
X Window System drivers.
Installing modules ...done.
Installing graphics libraries and desktop services components ...done.
Then open your terminal and run a command.
sudo apt-get install
virtualbox-guest-x11
Now just reboot your virtual machine and it will starting adjusting screen size accordingly you need.
