How to Install Virtualbox Guest additions for Oracle Enterprise Linux 6

No Comments

 

This tutorial leads straight on from ‘How to install Oracle Enterprise Linux 6 on Virtualbox’ and assumes that you have a clean install to work from.

If you haven’t installed OEL6 or have any problems with this tutorial, I recommend that you follow that tutorial before this one.
So, in virtual box, Guest additions gives you some cool stuff like improved mouse pointer integration and having shared folders between your host and your guest operating system and this makes it a lot easier to transfer files to your virtual machine.
All of the subsequent tutorials will assume that you have Guest additions installed.
It should be simple! You just click the menu item, the system mounts some files and runs  them and hey presto, guest additions are installed and working. Unfortunately, in Oracle Linux 6, it doesn’t work. The process completes but the install does not work.
The good news is that once you know how, you can fix this easily.
First, make sure that you can see the Virtialbox menubar at he top of the window.  If youare in scale mode pres R. CTRL and ‘C’ to exit into normal mode.
Next, go to the ‘Devices’ menu and click ‘Install Guest Additions’
Install Virtualbox Guest Additions

Install Virtualbox Guest Additions

Click Autorun

Click Autorun

An icon should appear on your desktop and a dialog will ask you what to do. Just click ‘OK’
Click run at the next prompt then enter your root password to authenticate.
The install script will run but will fail:
The install script will fail to install the guest additions

The install script will fail to install the guest additions

You are told to to look in the log file:  /var/log/vboxadd-install.log
where you will see the error:
/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
So, as you may have guessed, you need to install the kernel source.
 
The script actually gives you the instructions that you need to follow. In this case it suggests that you run 
> yum install kernel-uek-devel-2.6.39.400.17.1.el6uek.x86_64
This might be different for you so just follow the instructions that the script gives you.
Then
> yum install gcc
 
That should run without a problem, so now you can rerun the ‘Guest Additions’ installer again.
Rerun the guest additions installer

Rerun the guest additions installer

Click run and enter your root password when prompted.
The installer will run again and should succeed this time.
Re run the guest additions installer

Re run the guest additions installer

This time the guest addittions installer should complete successfully.

This time the guest addittions installer should complete successfully.

Thats it. Guest Additions are now installed. Give your VM a reboot and you will find your shared folder is mounted.
 
Now,shutdown your VM and take a snapshot.
 
Finally, we will export the VM so that you have a clean install to start other projects from.
 
Categories: Featured, Tutorial Tags: Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *