Installing VirtualBox Guest Additions on Oracle Enterprise Linux 6 Guest

Are you having trouble getting Guest Additions installed on your OEL 6 guest machine in VirtualBox? I had quite a time with it myself, and while I am not the first person to encounter the issue, I had to combine tips from a few places and gain some additional understanding about Oracle Enterprise Linux to get it to work.

Assuming you’ve already installed Linux, you can start installation of Guest Additions from the VirtualBox Devices menu:

On the desktop, you will now find a shortcut to the Guest Additions. You might be prompted to open the Autorun Prompt, do this andyou should see the Guest Additions Installation start… and fail:

You are advised to examine the log at /var/log/vboxadd-install.log to figure out the cause, which in my case the log included:

/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.

To resolve this you must install the kernel source which is not there by default. The Guest Additions Installation output suggests you install it via yum and even provides you the command to do so, but not so fast… if you don’t have yum configured yet  that will fail too. And you will also need the gcc package for the installer to update the kernel, but don’t worry, it’s all covered below. If you are running a version of Oracle Linux other than 6, you might visit first to get the correct URL for the below setup, otherwise:
# cd /etc/yum.repos.d
Next, use yum to install everything you need to get that Guest Additions Installer to work!
# yum update

# yum install gcc
# yum install kernel-uek-devel
If the above installs succeeded, try the Guest Additions installer once again:

And now you’re good to go. Now might be a good time to configure a shared folder from your host machine, and reboot to see if it works. Shared folders will appear at /media:

If these instructions did not help you, consider the pages below that provided helpful tips as I was troubleshooting the problem:


17 thoughts on “Installing VirtualBox Guest Additions on Oracle Enterprise Linux 6 Guest

  1. Derrick, many thanks for posting this. It worked like a charm, but it might help others to know hat you need to eject the vbox additions media before trying the install again.

  2. You are life saver. Thank you. Worked really good. And updating the the YUM messed up the OEL. So I did all the steps apart from # yum update

  3. Unfortunately, I have tried, was still failing to install the guest additions. uname -r returns: 2.6.39-400.17.;.e;6uek.x86_64
    I have ran -> yum install kernel-uek-devel. It said already installed and latest version.

    Also unmounted the guest addition ISO and reran. Seems no luck.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s