Date Created: Sat 19-Sep-2009

Related Document Categories:



    How to Install virtual Box on Centos 5

    First of all I downloaded the Centos 5 DVD image and then burned a disk.

    I then installed a Centos 5 Server using the following guide:


    http://www.webspheretools.com/sites/webspheretools.nsf/docs/How%20to%20install%20Centos%205.3%20On%20VMWare%20Workstation

    I downloaded virtualbox from:

    http://www.virtualbox.org/wiki/Linux_Downloads

    I needed to grab the Centos i386 version as this was my OS as I chose Centos 5.3 as my base operating system as mentioned above.


    [root@localhost virtualbox_install]# rpm -ivh VirtualBox-3.0.6_52128_rhel5-1.i386.rpm
    Preparing... ########################################### [100%]
    1:VirtualBox ########################################### [100%]

    Creating group 'vboxusers'. VM users must be member of that group!

    No precompiled module for this kernel found -- trying to build one. Messages
    emitted during module compilation will be logged to /var/log/vbox-install.log.

    Compilation of the kernel module FAILED! VirtualBox will not start until this
    problem is fixed. Please consult /var/log/vbox-install.log to find out why the
    kernel module does not compile. Most probably the kernel sources are not found.
    Install them and execute

    /etc/init.d/vboxdrv setup

    as root.

    [root@localhost virtualbox_install]#

    ======================================

    I now have to figure out how to install the kernel sources.

    I will try yum

    yum install kernel

    ======================================


    Stopping VirtualBox kernel module [ OK ]
    Recompiling VirtualBox kernel module [FAILED]
    (Look at /var/log/vbox-install.log to find out what went wrong)


    Ok we need to get Kernel source ....

    ========================================

    [root@localhost virtualbox_install]# yum list | grep kernel-dev
    kernel-devel.i686 2.6.18-164.el5 updates


    =========================================

    yum install kernel-devel


    =========================================

    I then ran:

    yum install rpm-build redhat-rpm-config unifdef

    yum install kernel-xen-devel

    [root@localhost virtualbox_install]# view /var/log/vbox-install.log
    Makefile:147: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.

    =======================================

    I think it is a make problem so I am now installing gcc and make etc


    yum install gcc gcc-c++ make automake 

    =======================================

    restarted to ensure that new kernel was being used, then tried again, since I was now running as the same kernel as the referred source I think it will work?


    =======================================

    [root@localhost ~]# uname -a
    Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Thu Sep 3 03:33:56 EDT 2009 i686 i686 i386 GNU/Linux

    I can now confirm new kernel is loaded, so I re-tried the vboxdrv setup and all worked fine.

    .


    [root@localhost ~]# which VirtualBox
    /usr/bin/VirtualBox

    [root@localhost ~]# VirtualBox
    X connection to localhost:10.0 broken (explicit kill or server shutdown).

    We need to install Xming and set up X11 Forwarding on Putty



    Created putty profile with X11 forwarding enabled







    Save Putty configuration, then open SSH shell


    One we have tested XWindows we can try again:

    run command: VirtualBox



    Accept Virtual Box License



    Click New as shown above, then the New Virtual Machine Wizard will be presented.



    Click to Next to continue



    Fill in a name for your Virtual machine and select an operating system. I chose Linux/Red Hat as I am going to install a Centos 5.3 Virtual machine so I can install Websphere 7 ND on it for testing SSL between IHS and WebSphere.

    Click Next to move onto the Memory configuration screen.



    I have selected 1GB memory, you can choose as appropriate depending on how much memory your host has.



    I have opted to create a new virtual disk, click Next to continue



    The wizard then begins a new create new virtual disk process



    I have opted for the Dynamically expanding storage option as I am unsure of how much space I will actually need.



    It size will start as 8GB, I will allow it to expand as required to 15GB.

    Click Next to continue



    The final screen gives a summary report. click Finish to continue.




    You will now be presented with the main Virtual Box panel, where you can power on the new Virtual Machine, by double clicking the Virtual Machine Label as shown below. There will be a prompt that your key board is now being captured so you can pass keyboard commands to the Virtual Machine.

    You can use Right-Control key to toggle.



    or






    You will then be presented with a First time Run wizard, click Next to continue.



    You will now be prompted for the media you wish to use for the installation, I have chosen my DVD player as this is where My Centos DVD is located. You can select to use an actual image file, however you would have to upload it via scp to the host.






    Click Finish to complete

    In my case after the configuration I go this screen, when I tried to close after seeing FATAL: No Bootable: media found! System halted.



    This was because the DVD drive was open, I closed the DVD drive and then it was ok. I guess this could also happen in the Drive was not mounted.

    See this article to learn how to mount a DVD drive:

    http://faq.screv.com/sites/screv_faq.nsf/docs/How%20to%20mount%20cdrom%20in%20RHEL

    As you can see the Centos Installation now starts





    You can follow my guide on how to install Centos on this VMWare guide:

    http://www.webspheretools.com/sites/webspheretools.nsf/docs/How%20to%20install%20Centos%205.3%20On%20VMWare%20Workstation

    Note: If you CDROM/DVD is not mounted you can power down your VM and re-configure the CDROM/DVD settings.





    Anyway that is my first experience of VirtualBox. I will be using this in production very soon, lets see how stable it is?

    Regards

    SCR - Steven Charles Robinson



Middleware Mentor - Steven Charles Robinson

About Me

Steve Robinson has been working in IT for over 15 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware consulting. Steve comes from both an administration and development background.

Before moving to JEE, Steve was an accomplished developer and consultant for both IBM Lotus Notes and Microsoft .NET Technologies.

Follow Steve as @stevencrobinson on twitter.

Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Oracle WebLogic Categories

JBoss Categories

Other Categories