Home > Uncategorized > CentOS 5 (64) on Sun VirtualBox on Fedora 10 (64)

CentOS 5 (64) on Sun VirtualBox on Fedora 10 (64)

I’ve been playing around with Sun VirtualBox. Installation of both Windows XP and CentOS 5 went smooth, but installing the guest OS tweaks – in the VirtualBox world referred to as Additions – gave me a little trouble on CentOS. It’s done the same way as on VMWare, by mounting an ISO with the scripts and drivers required. It’s not as painless as on VMWare though.

For starters, you have to find the ISO yourself – but I’ll give you a hint: look in /usr/share/virtualbox/ :-) After mounting the ISO image, a directory popped up. I tried double clicking on autorun.sh but nothing ever comes easy, does it? I tried running it in the terminal, and was somewhat enlightened as I realized it was looking in vain for gksu – probably a Gnome frontend for su. Luckily there seemed to be another script I could run – VBoxLinuxAdditions-amd64.run – but it whined about OpenGL direct rendering:

Verifying archive integrity… All good.
Uncompressing VirtualBox 2.2.2 Guest Additions for Linux Installation……
VirtualBox 2.2.2 Guest Additions installation
Please install the build and header files for your current Linux kernel.
The current kernel version is 2.6.18-128.el5
This system does not seem to have support for OpenGL direct rendering.
VirtualBox requires Linux 2.6.27 or later for this. Please see the log.
file /var/log/vboxadd-install.log if your guest uses Linux 2.6.27 and you still see this message.
Problems were found which would prevent the Guest Additions from installing.
Please correct these problems and try again.

Before I ran the script, I made sure the newly installed CentOS was crispy by running yum upgrade. I also had a sneaking suspicion that a C compiler was required, so I made sure the system also sported gcc. The only thing I personally noticed by reading the message above, was that some missing OpenGL crap prevented the additions to be installed. As I was typing the message in this blog, I also noticed something about kernel headers. Rather embarrassing, but I really didn’t see it until now. Anyway, obviously the thing needed was kernel goodness, so I ran yum install kernel-devel. That seemed to make the VirtualBox additions script more happy and now it seems to be running flawlessly.

So, to summarize – what to do to make the damned thing work:

$ yum upgrade -y
$ yum install -y gcc kernel-devel
$ ln -s /usr/src/kernels/2.6.18-128.1.10.el5-i686 /usr/src/linux
$ cd /media/VBOXADDITIONS_2.2.2_46594/
$ sh VBoxLinuxAdditions-amd64.run

I rebooted as I was told to, but mouse integration didn’t seem to work. Probably due to the kernel being upgraded without rebooting and actually utilizing it. So, I ran the additions script again, rebooted again and woo – mouse integration seems to work. The clipboard doesn’t though, and the maching is still creating some really nasty spikes on my CPU graph every three seconds or so:

VirtualBox-CPUUsage

It’s worth mentioning that when I’m running my Windows XP guest in VirtualBox, the CPU graphs on the host system are nice and flat.

I’m not entirely pleased, but I think VirtualBox will eventually win me over from VMWare.

Uncategorized , , , ,

  1. June 24th, 2009 at 12:38 | #1

    I have the exact same problem.

    I completely misread the error message. I didn’t realise the 2.6.27 kernel requirement was only for the OpenGL. I spent the past day trying to decide whether I should break my Centos by building the 2.6.27 kernel.

    They should have made the error message more readable.

    Thanks for the help.

  2. hc
    June 24th, 2009 at 20:14 | #2

    Glad I could help! ;)

  3. Serg
    July 1st, 2009 at 14:26 | #3

    Mandriva 2009.1 on Sun VirtualBox 2.2.4 on WinXPPro SP3 :)
    Thanks for the help.

  4. July 3rd, 2009 at 02:01 | #4

    I noticed there was something in the figures I didn’t see in the text. The symbolic link. That was the key to my success. Thanks for the pictures!

  5. tws
    July 30th, 2009 at 21:04 | #5

    The symlink is what I was missing, and this did it for me. Would have never come up with that myself. Thanks!

  6. Simon
    August 4th, 2009 at 13:21 | #6

    thanks for this info. I had been trying to mount a vbox folder and was having problems installing the guest additions.

  1. No trackbacks yet.
Mail