Friday, September 6, 2013

Install VirtualBox linux guest additions in ocm VM

 

Tried to follow steps from this article:

http://www.dedoimedo.com/computers/virtualbox-guest-addons.html

But it was failing with below message:

The command was run: sh ./VBoxLinuxAdditions.run

ocm7

 

Tried to run “yum install kernel-devel-2.6.18-164.el5”, it returned nothing to do.

ocm8

Then realized that yum was not setup correctly.

http://public-yum.oracle.com/ 

Above link has details on how to setup yum.

ocm9

Then performed(as per http://www.virtualbox.org/manual/ch04.html#idp53088720) :

yum install kernel-devel


==> Tried to run sh ./VBoxLinuxAdditions.run  and it still failed with same message. Did a reboot. But still failed !!!


 


Paid close attention to output and realized that it could be because of missing gcc.


“The gcc utility was not found.If the following module compilation fails then this could be the reason and you should try installing it.”


Then did:


yum install gcc


==> Tried to run sh ./VBoxLinuxAdditions.run  and it still failed with same message. Did a reboot. But still failed !!!


Check /var/log/vboxadd-install.log:


ocm10


/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.


uname –r showed:


2.6.18-164.el5


Checked /usr/src/kernels, it didnt have matching directory to above release:


it had “2.6.18-348.16.1.0.1.el5-i686”


So did “yum install kernel”


Above command installed release 2.6.18-348. Rebooted the VM and uname –r showed 2.6.18-348.16.1.0.1.el5


==> Tried running again “sh ./VBoxLinuxAdditions.run“


and this time it worked.


ocm11



Linux guest additions is done!!

No comments:

Post a Comment