Installing Guest Additions into CentOS/RHEL 5.4

Discussions about using Linux guests in VirtualBox.
Post Reply
billp
Posts: 2
Joined: 10. Feb 2010, 19:55
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: CentOS 5.4

Installing Guest Additions into CentOS/RHEL 5.4

Post by billp »

I get an error message when running the VBoxLinuxAdditions-x86.run shell saying that my system is not set up to install kernel modules. I installed DKMS and can see it in the proper folders. I also installed the kernel-devel package as suggested as well. My host is Windows Vista. Can anyone share any insight into this problem and its resolution?

Thank you.
jbrogan
Posts: 3
Joined: 11. Feb 2010, 20:27
Primary OS: MS Windows XP
VBox Version: OSE Fedora
Guest OSses: CentOS 5.4

Re: Installing Guest Additions into CentOS/RHEL 5.4

Post by jbrogan »

I had this same problem. In my case the error message said to look at /var/log/vboxadd-install.log.
This said it failed to find kernel sources at KERN_DIR.
I set it
# export KERN_DIR=/usr/src/kernels/2.6.blah.blah...
and then the installation of the guest additions worked.

My problem now is that the VBoxManage command seems to be missing.
billp
Posts: 2
Joined: 10. Feb 2010, 19:55
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: CentOS 5.4

Re: Installing Guest Additions into CentOS/RHEL 5.4

Post by billp »

Thanks jbrogan -- exporting the KERN_DIR did the trick!
jeherul
Posts: 1
Joined: 20. Apr 2010, 15:53
Primary OS: Other
VBox Version: OSE other
Guest OSses: RHEL4

Re: Installing Guest Additions into CentOS/RHEL 5.4

Post by jeherul »

billp wrote:Thanks jbrogan -- exporting the KERN_DIR did the trick!
But I am facing another problem . When i compile after exporting the KERN_DIR the virtual box kernel module again failed . It shows like following

[root@jeherul ~]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module [ OK ]
Recompiling VirtualBox kernel module [ OK ]
Starting VirtualBox kernel module [FAILED]
(modprobe vboxdrv failed. Please use 'dmesg' to find out why)

[root@jeherul ~]# dmesg |grep vboxdrv
vboxdrv: disagrees about version of symbol struct_module

Please help me .

Thanks and regards
Jeherul
fixedwheel
Volunteer
Posts: 1699
Joined: 13. Sep 2008, 02:18

Re: Installing Guest Additions into CentOS/RHEL 5.4

Post by fixedwheel »

jeherul wrote:When i compile after exporting the KERN_DIR the virtual box kernel module again failed
exporting the KERN_DIR should not be needed and is probably not the right fix for that fail

post the ouput of

Code: Select all

uname -a

Code: Select all

rpm -qa|grep kernel
Hortnon
Posts: 22
Joined: 1. Jul 2009, 19:17
Primary OS: MS Windows 2008
VBox Version: PUEL
Guest OSses: Solaris, Linux, Windows

Re: Installing Guest Additions into CentOS/RHEL 5.4

Post by Hortnon »

I'm also having this issue, so here's my output for that...

Code: Select all

Linux grid11 2.6.18-164.15.1.el5PAE #1 SMP Wed Mar 17 12:14:29 EDT 2010 i686 athlon i386 GNU/Linux

Code: Select all

kernel-headers-2.6.18-164.15.1.el5
kernel-PAE-2.6.18-164.15.1.el5
kernel-PAE-2.6.18-164.el5
fixedwheel
Volunteer
Posts: 1699
Joined: 13. Sep 2008, 02:18

Re: Installing Guest Additions into CentOS/RHEL 5.4

Post by fixedwheel »

Hortnon wrote:

Code: Select all

kernel-headers-2.6.18-164.15.1.el5
kernel-PAE-2.6.18-164.15.1.el5
kernel-PAE-2.6.18-164.el5

Code: Select all

sudo yum install kernel-devel
have a look into the VBox manual, or http://forums.virtualbox.org/viewtopic.php?f=3&t=15679 (fedora instructions: its the same red hat brew)
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: Installing Guest Additions into CentOS/RHEL 5.4

Post by Technologov »

I'll tell you how I installed it:

Install RHEL 5.x guest, and during installation, choose "Development" category.
This is enough to install Linux Additions.

NOTE: I have not updated RHEL since, to make sure that kernel and it's headers are in sync.

-Technologov
MajorGeek
Posts: 1
Joined: 17. Jul 2010, 16:21
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: RHEL, Server 2003 and 2008

Re: Installing Guest Additions into CentOS/RHEL 5.4

Post by MajorGeek »

:D Good tip Technologov. I am relatively new to Linux and have been battling with trying to install additions, that made it simple.
Rodman
Posts: 1
Joined: 30. Jun 2014, 22:13

Re: Installing Guest Additions into CentOS/RHEL 5.4

Post by Rodman »

I was installed the kernel

yum install kernel-devel-2.6.32-431.20.3.el6.x86_64 #Install Kernel
export KERN_DIR=/usr/src/kernels/2.6.32-431.20.3.el6.x86_64/ #Set var KERN_DIR
yum install gcc ncurses ncurses-devel #Install gcc compiler

And everything work OK.
Post Reply