Search This Blog

Thursday, November 11, 2010

RHEL 6: Part II: Installation of an RHEL 6 instance in a KVM environment

A previous article outlined the new things of the RHEL 6 beta for server administrators. Today, RHEL 6 was released by RedHat. A good way to test the new environment is to take advantage of virtualization technology and install a virtual RHEL 6 instance. I am a user of the Fedora project in my laptop environment, as it is close to my RHEL production line, its free and it works well on my Latitude E6410 system. So, time to get our hands dirty and go through a proper RHEL 6 installation.

As a rule of thumb, you will need about 12 Gigs of free space to have a working RHEL 6 beta environment (3 of them will be used to download and store the RHEL 6 beta ISO image and the rest will be the install itself). A computer with at least 4 Gigs of RAM and 2 processing cores is a must, if you need to keep working with your host OS and other guests at the same time.

My Fedora Core 14 distro provides a KVM virtualization environment. After downloading the RHEL 6 x86_64 image from RedHat Network RHEL 6 Channel, I fire up '/usr/bin/virt-manager' from the command line as the root user. For those of you that prefer to start things graphically, the Virtual Machine Manager is normally situated under 'Applications'->'System Tools' in a standard FC 12 installation. Either way, I am greeted by the Virtual Machine Manager startup screen, I click on the 'Create a new virtual machine' button on the upper left corner, as shown below.


The first VM building screen shown above allows me to name my new guest OS (I like to avoid spaces in the names so I type 'RHEL6' rather than 'RHEL 6') and since I have already downloaded the DVD ISO image, I choose to install from 'Local installation media'. I press the 'Forward' button and the second VM building screen appears (shown below).


In the next step, I inform the VM manager about the whereabouts of the RHEL 6 DVD ISO images, the guest OS type ('Linux') and the version (FC14 and updated KVM versions on FC12 and FC13, will show the option for 'Red Hat Enterprise Linux 6').

The next VM building screen (third in sequence) defines the allocation of RAM and CPU resources. You know that with RAM, the more the better. My E6410 is fitted with 8 Gigs of RAM and quad core processor, so I can allocate a modest 2 Gigs of RAM and 2 cores.


The configuration of the virtual machine's disk image follows as shown below. On 'Step 4 of 5', I select the second option 'Select managed or other existing storage'.


When you hit the 'Browse' button, you will get to the Virtualization Manager volume manager, shown in the next screen caption. The virt-manager organizes images in virtual storage pools. I have two in my system, the default one (which depending on your partitioning options can be under /var) and a user defined one (vm1), which I made for the special purpose of storing virtual disk images. I select the user defined one, where I know I have enough space and I allocate approximately nine and a half Gigs to make room for my RHEL 6 virtual disk image (/vm1/RHEL6.img).




When I can, I like to use the qcow2 QEMU Copy On Write image format, due to its versatility and performance. The Allocation is set to 0 MB, as we do not need to pre-allocate all of the 9.5 Gigs. Instead, the virtualization engine will allocate space on demand. If you pre-allocate, things can be a little bit faster. In my case, I prefer to optimize disk space usage over speed.

One final step prior firing up the virtual machine remains. Step 5 of 5 confirms that we should be all set to go. Note the network parameters (expand the 'Advanced options') that indicate a NAT bridged interface. 'Virt Type' should be set to 'kvm' and 'Architecture' to x86_64. In that way, you can have optimal results and expand into more than 4 Gigs of RAM, if you can afford the RAM.  



That's all, we hit the 'Finish' button. The virtual machine will boot the virtual BIOS and load the emulated Local CDROM/ISO image of the RHEL 6 distribution. At the initial greeting GRUB screen, it is wise to choose to install with the Basic video driver installation option, to avoid any undesired video emulation effects. 


After the RHEL 6 greeting screen and the choice of language/keyboard, you should get a warning, which relates to the process of initializing the virtual drive image. This is quite normal and provided you have selected the right virtual image, go ahead and 'Re-initialize all'.  


You can then choose a default partitioning scheme (Use All Space) and click Next.


This should get you to the software configuration screen. What you choose to install its up to you. For the purposes of the evaluation, I went for a Basic Server installation with the option to customize the packages ('Customize now'). I made sure that I took my time to select database servers, the KDE and GNOME graphical environments and most of the development tools. Thinks can be easily added at the post-installation stage.


At this point, set the root password, and let the routines perform the installation for you. The system will eventually reboot and enter the familiar First-boot stage, where you need to make additional users, set the time and date (recommended to use NTP). One important difference I came across from previous RHEL versions is that the First Boot has stopped being annoying in the process of trying to convince you to register with RHN. That has been left as a post install step. In fact, this is the first thing I do on the new  system, using the rhnreg_ks utility, as shown below.


After doing that, and issuing a 'yum -y update', it turns out that already there are about 150 Megs worth of updates to be done. Latest reported kernel as of today (11/11/2010) is 2.6.32-71.7.el6 (Oct 27 2010).

Let the fun begin! Future articles will present the first impressions.

No comments:

Post a Comment