VirtualBox is a good operating system-level virtualization platform alternative when compared to other more popular utilities such as VMware, because it is free & open-source. However, the by-default hardware integration between the host & the guest operating system, is not as tight as it is under VMware, at least in my experience.
For instance, if you were to run a GNU/Linux distribution such as CentOS, under Windows 8.1 (the host), then you might immediately notice that the mouse pointer movements are not quite responsive or sensitive, or that the screen resolution cannot be set to its maximum etc, compared to the host operating system.
But all these (& a couple more) drawbacks can be fixed by installing an additional VirtualBox software pack called the ‘Guest Additions’. Once installed, it enables tighter hardware integration between the host & the guest OS, after which, you would not actually be able to tell that you are logged into a virtual machine at all.
If you are running CentOS 6.5 as the guest operating system under Windows 8.1 (the host) and looking for a way to install this pack, then this article is for you. So without any further delay, let us begin! …
Step 1: First run your CentOS 6.5 virtual machine. Then open a terminal window and enter the below command to become the root.
When asked, enter the root’s password.
Step 2: Now enter the below command.
This will give you an output containing the currently active Kernel’s version. Use your mouse to copy it (or you can type it in if you like).
Step 3: Now enter the below command and append the above copied Kernel version after the ‘-‘ sign, don’t leave any spaces in between.
yum install kernel-devel-
Below is what mine looks like:
yum install kernel-devel-2.6.32-431.e16.x86_64
Step 4: It might take a couple of minutes to install, depending on the speed of your internet connection. Once it finishes, we have to install another package called ‘gcc’ (GNU’s C++ compiler). Use the below command for that.
yum install gcc
Now we are done installing the prerequisites and can move on with the ‘guest additions’ installation.
Step 5: This time, click on the VirtualBox menu of the VM, and go to: ‘Devices’ --> ‘Insert Guest Additions CD image…’, as shown below.
Step 6: After a couple of seconds, a dialog-box will appear, simply click its ‘OK’ button…
Then choose ‘Run’ from the one that comes after…
When asked, type in the root password also…
The installation might take a minute or two… so be patient. If everything goes accordingly, you should get an output similar to the below one. If there are no ‘Failed’ messages, you are good to go.
Once everything finishes, it will ask you to type the ‘Enter’ key. After that, for the changes to take affect, please reboot the computer. From next time on, you should notice the mouse pointer movements are extremely precise & that you can actually run the virtual machine in fullscreen (or resize it freely) using the maximum native resolution of your display screen.
As briefly mentioned in the beginning, it improves few other deep hardware integration also, but those two are the easily noticeable ones. That’s it, good luck (if the ISO gets mounted every time you log into the CentOS virtual machine, then right click on its icon on the desktop and choose ‘Eject’).