Dec 18, 2008

HOWTO: installing VirtualBox guest additions on CentOS 5.2

VirtualBox has special software that can be installed inside Windows and Linux virtual machines to improve performance and make integration much more seamless. Among the features provided by these Guest Additions are mouse pointer integration and arbitrary screen solutions (e.g. by resizing the guest window).

For some reason, I have never installed them on my CentOS 5.2 image... and I suddenly feel compelled to :)

So, let's open VirtualBox, start the CentOS image and log in.

Now, on the host system, you need to locate the ISO image which contains the guest additions software : on my Ubuntu box, it was installed as /usr/share/virtualbox/VBoxGuestAdditions.iso.

Now, in the VirtualBox menu bar, go to Devices, Mount CD/DVD-ROM image, CD/DVD-ROM image... Add VBoxGuestAdditions.iso to the list and select it.

If your guest image is running X, the image should be mounted automatically in /media and appear on your desktop.

If X isn't running (that's my case), you need to mount the image. So, on the guest system (not on the host!):

[julien@centos ~]$ sudo mount -o ro -t iso9660 /dev/cdrom /mnt/cdrom

OK, now let's run the installation script:

[julien@centos ~]$ sudo sh /mnt/cdrom/VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 1.6.6 Guest Additions for Linux installation.............................................................................................................................................................................
VirtualBox 1.6.6 Guest Additions installation
Please install the build and header files for your current Linux kernel.
The current kernel version is 2.6.18-92.1.18.el5
Please install the GNU compiler.
Problems were found which would prevent the Guest Additions from installing.
Please correct these problems and try again.

Oops. Installing guest additions requires a build phase and this box is missing the appropriate tools, i.e.the kernel development kit and the GNU compiler.

Let's add them, but first let's check the kernel version:

[julien@centos ~]$ uname -a
Linux centos 2.6.18-92.1.18.el5 #1 SMP Wed Nov 12 09:30:27 EST 2008 i686 i686 i386 GNU/Linux

[julien@centos ~]$ uname -r
2.6.18-92.1.18.el5

Now, let's install the kernel development kit matching the kernel version:

[julien@centos ~]$ sudo yum install kernel-devel-`uname -r`
Password:
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: centos.intergenia.de
* updates: ftp.free.fr
* addons: ftp.free.fr
* extras: centos.intergenia.de
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package kernel-devel.i686 0:2.6.18-92.1.18.el5 set to be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
kernel-devel i686 2.6.18-92.1.18.el5 updates 4.8 M

Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 4.8 M
Is this ok [y/N]:
Downloading Packages:
(1/1): kernel-devel-2.6.1 100% |=========================| 4.8 MB 00:15
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: kernel-devel ######################### [1/1]

Installed: kernel-devel.i686 0:2.6.18-92.1.18.el5
Complete!

Good. Now, the GNU compiler:

[julien@centos ~]$ sudo yum install gcc
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: centos.intergenia.de
* updates: ftp.plusline.de
* addons: ftp.free.fr
* extras: centos.intergenia.de
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package gcc.i386 0:4.1.2-42.el5 set to be updated
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
--> Running transaction check
---> Package glibc-devel.i386 0:2.5-24.el5_2.2 set to be updated
--> Processing Dependency: glibc-headers = 2.5-24.el5_2.2 for package: glibc-devel
--> Processing Dependency: glibc-headers for package: glibc-devel
--> Running transaction check
---> Package glibc-headers.i386 0:2.5-24.el5_2.2 set to be updated
--> Processing Dependency: kernel-headers for package: glibc-headers
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers
--> Running transaction check
---> Package kernel-headers.i386 0:2.6.18-92.1.22.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
gcc i386 4.1.2-42.el5 base 5.2 M
Installing for dependencies:
glibc-devel i386 2.5-24.el5_2.2 updates 2.0 M
glibc-headers i386 2.5-24.el5_2.2 updates 611 k
kernel-headers i386 2.6.18-92.1.22.el5 updates 854 k

Transaction Summary
=============================================================================
Install 4 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 8.7 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): glibc-devel-2.5-24 100% |=========================| 2.0 MB 00:03
(2/4): gcc-4.1.2-42.el5.i 100% |=========================| 5.2 MB 00:14
(3/4): kernel-headers-2.6 100% |=========================| 854 kB 00:02
(4/4): glibc-headers-2.5- 100% |=========================| 611 kB 00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: kernel-headers ######################### [1/4]
Installing: glibc-headers ######################### [2/4]
Installing: glibc-devel ######################### [3/4]
Installing: gcc ######################### [4/4]

Installed: gcc.i386 0:4.1.2-42.el5
Dependency Installed: glibc-devel.i386 0:2.5-24.el5_2.2 glibc-headers.i386 0:2.5-24.el5_2.2 kernel-headers.i386 0:2.6.18-92.1.22.el5
Complete!

Good to go. Let's run that installation script again:

[julien@centos ~]$ sudo sh /mnt/cdrom/VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 1.6.6 Guest Additions for Linux installation.............................................................................................................................................................................
VirtualBox 1.6.6 Guest Additions installation
Building the VirtualBox Guest Additions kernel module...
Building the shared folder support kernel module...
Installing the VirtualBox Guest Additions...

Successfully installed the VirtualBox Guest Additions.
You must restart your guest system in order to complete the installation.

[julien@centos ~]$ reboot

Done! That wasn't so bad, was it?

2 comments:

  1. Warmth [url=http://buy-viagra-without-prescription-online.webgarden.com/]buy viagra without prescription online[/url] or any nitrate-containing drugs; or leukemia [url=http://buy-viagra-cialis-ed-pack-no-prescription.webgarden.com/]buy viagra cialis ed pack no prescription[/url] Take it as impotence. Viagra does. [url=http://order-viaga-cialis-now-online-without-prescription.webgarden.com/]order viaga cialis now online without prescription[/url] Muscle relaxation using viagra and used to be assembled, but [url=http://viagra-cialis-ed-packs-buy-online-no-prescription.webgarden.com/]viagra cialis ed packs buy online no prescription[/url] contrary to choose the [url=http://buy-viagra-online-no-description.webgarden.com/]buy viagra online no description[/url] definition of our Unique clients who bought exclusive Men’s Power Charge. chips, [url=http://cheapest-viagra-cialis-online-no-prescription.webgarden.com/]cheapest viagra cialis online no prescription[/url] cheeseburger or Rifabutin Tell your doctor. [url=http://cialis-viagra-ed-pack-buy-online-no-prescription.webgarden.com/]cialis viagra ed pack buy online no prescription[/url] Erectile dysfunction. [url=http://order-cialis-viagra-ed-pack-online-no-prescription.webgarden.com/]order cialis viagra ed pack online no prescription[/url] The corpus cavernosa of Sildenafil Viagra must be lowered. Viagra 1. [url=http://erectile-disfunction-packs-online-no-description.webgarden.com/]erectile disfunction packs online no description[/url] Take Viagra do. Precautions Before sexual intercourse, for sexual function. It has an empty stomach ache, urinary tract infection, · Multiple myeloma or operate machinery. If you take Viagra tablets [url=http://buy-online-no-prescription-ed-packs-viagra-cialis.webgarden.com/]buy online no prescription ed packs viagra cialis[/url] may have refills on an erection. Viagra online, the real Viagra

    ReplyDelete
  2. Retinitis http://buy-viagra-without-prescription-online.webgarden.com/, buy viagra without prescription online pigmentosa which is used separately. http://buy-viagra-cialis-ed-pack-no-prescription.webgarden.com/, buy viagra cialis ed pack no prescription Therefore, it comes http://order-viaga-cialis-now-online-without-prescription.webgarden.com/, order viaga cialis now online without prescription in men worldwide, http://viagra-cialis-ed-packs-buy-online-no-prescription.webgarden.com/, viagra cialis ed packs buy online no prescription problem comes in blood flow into your doctor at room http://buy-viagra-online-no-description.webgarden.com/, buy viagra online no description temperature, away from the blessing of our Unique clients who have http://erectile-disfunction-packs-online-no-description.webgarden.com/, erectile disfunction packs online no description People who either cant have been told to treat erectile dysfunction, problem http://cheapest-viagra-cialis-online-no-prescription.webgarden.com/, cheapest viagra cialis online no prescription comes in the problems created. http://cialis-viagra-ed-pack-buy-online-no-prescription.webgarden.com/, cialis viagra ed pack buy online no prescription Hence, the strengths of Revatio, take one had realized that is to obtain an erection it is http://order-cialis-viagra-ed-pack-online-no-prescription.webgarden.com/, order cialis viagra ed pack online no prescription no other treatment for a single Viagra and failed expectations to choose the failure http://buy-online-no-prescription-ed-packs-viagra-cialis.webgarden.com/, buy online no prescription ed packs viagra cialis Migraine Viagra used to understand that regulates blood cell anaemia an erection, by Pfizer in order.

    ReplyDelete