vbox additions and kernel modules.

Support for the other architectures (X86_64, IA-64, and PowerPC)
Post Reply
nightshade0115
Posts: 3
Joined: 2009/05/17 20:51:28

vbox additions and kernel modules.

Post by nightshade0115 » 2010/06/14 13:38:56

I am trying to install vbox additions. I get the following:

Verifying archive integrity... All good.
Uncompressing VirtualBox 3.1.8 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 3.1.8 of VirtualBox Guest Additions...
Building the VirtualBox Guest Additions kernel modules [FAILED]
(Your system does not seem to be set up to build kernel modules.
Look at /var/log/vboxadd-install.log to find out what went wrong)
Installing the Window System drivers
Installing X.Org 7.1 modules [ OK ]
Setting up the Window System to use the Guest Additions [ OK ]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.

Problem looks like building kernel modules. Is there a qd fix for this

User avatar
TrevorH
Forum Moderator
Posts: 27384
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: vbox additions and kernel modules.

Post by TrevorH » 2010/06/14 14:21:10

[quote]
nightshade0115 wrote:

(Your system does not seem to be set up to build kernel modules.
Look at /var/log/vboxadd-install.log to find out what went wrong)
[/quote]

Did you look in the file it told you about to see what went wrong?

azjp
Posts: 14
Joined: 2010/02/08 18:10:49
Location: Arizona, USA

Re: vbox additions and kernel modules.

Post by azjp » 2010/06/14 22:42:43

I assume that you are building a CentOS VM on a Windows host and that you are having trouble getting the Guest Additions installed on the VM. From the error messages I also assume that you have not installed the packages you need to build a CentOS kernel.

If I'm wrong, please disregard the rest of the post.

These are to be installed on the GUEST operating system, not the host. The following activities take place on the Guest.

You can get the packages over the Internet or you can use the .iso file from which you installed CentOS. I prefer to use the installation
.iso.

If you choose to use the .iso, you'll need to rename the two files in /etc/yum.repos.d/ so they do not end in .repo. Put the following into a new /etc/yum.repos.d/CentOS-Media.repo:

[quote]# CentOS-Media.repo
#
# This repo is used to mount the default locations for a CDROM / DVD on
# CentOS-5. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#

[c5-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CD
gpgcheck=0
enabled=1[/quote]
Use VirtualBox to mount the installation .iso and do the following:

[quote]mkdir -p /media/CD
mount /dev/cdrom /media/CD[/quote]

Regardless of where you get the packages you'll need to:

[quote]yum clean all
yum install gcc-c++
yum install kernel-devel
yum install kernel-headers[/quote]

After you get the packages installed, do what you did at the start of your post to install the Guest Additions. You will get warnings about having old software. Pay attention to what you will not be able to do. I appreciate the Guest Additions even without some of the features.

Reboot the GUEST and you should be fine.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

vbox additions and kernel modules.

Post by pschaff » 2010/06/15 20:45:49

[quote]
azjp wrote:
...
You can get the packages over the Internet or you can use the .iso file from which you installed CentOS. I prefer to use the installation
.iso.
[/quote]
That means you will not be getting any subsequent updates. It is preferable to use the standard repos with CentOS mirror network.

[quote]
If you choose to use the .iso, you'll need to rename the two files in /etc/yum.repos.d/ so they do not end in .repo. Put the following into a new /etc/yum.repos.d/CentOS-Media.repo:
[/quote]
That approach will work, but should only be used if the network is not available. There is also a cleaner approach than renaming/changing standard repo definitions if you do want to use the ISO. Mount the ISO image on the virtual CD/DVD device, then:[code]
yum --disablerepo \* --enablerepo c5-media clean all
yum --disablerepo \* --enablerepo c5-media install gcc-c++
# OR
yum --disablerepo \* --enablerepo c5-media groupinstall "Development Tools"
yum --disablerepo \* --enablerepo c5-media install kernel-devel
yum --disablerepo \* --enablerepo c5-media install kernel-headers[/code]

You may also want to read the [url=http://wiki.centos.org/HowTos/Virtualization/VirtualBox]VirtualBox Wiki page[/url] and install dkms to automate updating the process of vbox driver updates when a new kernel is installed.

[Moderator edited to correct a minor foo-bar.]

azjp
Posts: 14
Joined: 2010/02/08 18:10:49
Location: Arizona, USA

Re: vbox additions and kernel modules.

Post by azjp » 2010/06/15 21:46:02

Phil's comments are absolutely correct if you are using the VM for any on going endeavor or are using the VMs to access the Internet.

I certainly should have made myself clear about using my approach only in limited circumstances. It is workable for those first few efforts at installing CentOS. Getting an installation up to date and then reinstalling it chew up a bunch of time and bandwidth. I use this approach because I have a network of CentOS VMs that talk with one another, but never venture onto the Internet.

Thank you for pointing out the weakness of my solution for those who follow.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: vbox additions and kernel modules.

Post by pschaff » 2010/06/16 01:17:01

Thank you for your courteous acceptance of my constructive criticism. :pint:

Post Reply

Return to “CentOS 5 - X86_64,s390(x) and PowerPC Support”