How to Install VirtualBox Guest Additions for CentOS 6.5 under Windows 8.1 (host)?

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.

CentOS 6.5 VM running on Windows 8.1 with Virtualbox 'Guest Additions' installed

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.

su -

When asked, enter the root’s password.

Step 2: Now enter the below command.

uname -r

Viewing the current Kernel's version in CentOS 6.5 VM

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.

Adding VirtualBox 'Guest Additions' for CentOS 6.5 virtual machine under Windows 8.1
(‘Guest Additions’, as you might have guessed, comes pre-bundled with VirtualBox, so there is no need to manually download it)…

Step 6: After a couple of seconds, a dialog-box will appear, simply click its ‘OK’ button…

Clicking the 'guest addtions' OK box in CentOS 6.5 virtual machine

Then choose ‘Run’ from the one that comes after…

Clicking the 'Run' button of VirtualBox 'Guest Additions' in Centos 6.5 VM

When asked, type in the root password also…

VirtualBox 'Guest Additions' asking for the root password (CentOS 6.5 VM)

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.

Making sure no errors are encountered during the VirtualBox 'Guest Additions' installation in CentOS 6.5 virtual Machine

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’).

17 thoughts on “How to Install VirtualBox Guest Additions for CentOS 6.5 under Windows 8.1 (host)?”

    • Hi Tommy,

      Sorry about the late response 🙂 . You can install the ‘Guest Additions’ on the Basic Server Edition (without the GUI) by first inserting the ‘Guest Additions…’ as mentioned in the article. After that install the ‘kernel-dev’ and the ‘gcc’ packages also.

      Then, create a new mount point. Let’s assume (as an example), that we’re going to mount it in ‘/mnt/guest_ad’. So first create the ‘guest_ad’ folder in ‘/mnt’. By default ‘VirtualBox’ inserts the image through ‘SCSI’ CD-ROM interface (/dev/sr…). If you don’t have anything mounted through ‘/dev/sr…’ then the device path will be ‘/dev/sr0. If so, simply mount it:

      mount /dev/sr0 /mnt/guest_ad

      If your set-up is different, make sure to replace ‘…/sr0′ accordingly. Anyhow, once mounted,’cd’ to the mounted folder and execute the ‘VBoxLinuxAdditions.run’ file to install it:

      ./VBoxLinuxAdditions.run

      Just follow the on-screen details to set things up. That should do it! (again, sorry about the late response).

  1. I have followed your instructions, which worked great for a CentOS 6.6 guest on a Windows 7 SP1 host. As soon as the Guest Additions compiled and installed in the VM, they immediately worked!
    However, I shut down and then rebooted the VM and the Guest Additions are not working; that is, my cursor becomes captured by the VM and I have to press the right Ctrl key to make the VM release my mouse cursor.
    When the VM booted, two message windows popped up saying, “VBoxClient: The VirtualBox service is not running! Exiting.". One disappeared immediately and the other disappeared after a few seconds.
    I checked the Service Configuration and it indicates all three Vbox services are running; vboxadd, vboxadd-service, and vboxadd-x11.
    Any ideas on how to get the Guest Additions working without re-installing them on every boot up of the VM?

  2. Thanks!!
    It worked fine for me and I did not have the problems reported by Gary. (Host: Win-7 SP1, Guest: CentOS 6.6 with all updates, VBox-Version: 4.3.26.)

    I did a reboot between installing the new kernel and proceeding. I did not see any change in kernel number. (It is now 2.6.32-504.16.2.el6.x86_64.)

    Bidirectional clipboard and shared folders also work well. The only thing that does not work is USB-integration, but that’s an old issue.

  3. Worked perfectly for me too, Gayan, thank you so much 🙂

    installing Guest Additions on RHL 7.2 on Windows 10 host, btw.

  4. WONDERFUL!

    FYI, these instructions worked perfectly for CentOS 6.8 guest on a Windows 7 host, using VirtualBox 5.1.8. Be warned that Oracle no longer ships a full GuestAdditions ISO with the VirtualBox installation, but you can visit this site to get it:
    http://download.virtualbox.org/virtualbox/
    Go to your version (as of today, 5.1.8 is the latest non-Beta), then look for “VBoxGuestAdditions 5.1.8.iso” and download it to your PC.

    Now I have full resolution dual monitors in the VM!

    Whoooo hoo!

  5. BTW, FYI, (and a host of other acronyms as appropriate)

    I have finally gotten this work for CENTOS 7.4 (still on Windows 7 Host)

    You need to have the VERY LATEST updates, of CentOS and VirtualBox and GuestAdditions.

    So I have:
    CentOS 7.4, “uname -r” 3.10.0-693.2.2.el7.x86_64
    VirtualBox 5.1.28
    GuestAdditions 5.1.28_117968

    I think what was causing heartburn before was trying to get CentOS 7 with an older version of VirtualBox and GuestAdditions. Once everything was updated to the latest, it just all snapped into place.

    Thanks again for these valuable instructions!

Leave a Comment

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

%d bloggers like this: