Since its acquisition of Qumranet in 2008, commercial Linux provider Red Hat Inc. has integrated Kernel-based Virtual Machine (KVM) virtualization into Red Hat Enterprise Linux (RHEL). Finally, Red Hat Enterprise Linux 5.4 natively supports KVM out of the box, is the first enterprise Linux provider to offer this as the default virtualization option. This article outlines the hardware requirements for KVM and how to configure an RHEL...
server as a KVM host.Do you have the proper hardware?
First, to install Red Hat you need the right hardware: Specifically, a CPU that supports virtualization. With Intel-based hardware, the CPU must support the Vanderpoolfeature (i.e., a feature enabling tighter coupling of virtualization and hardware) . If your server has an AMD processor, however, it must have Pacifica built in. In general, most server-grade hardware has these features, but older or cheaper hardware may not. Fortunately, this information is easy to uncover.
When booting the server, enter the cat /proc/cpuinfo command. For Vanderbilt-supported Intel processors, "vmx" should appear in the output's flag line. For AMD CPUs with Pacifica, a "vms" will appear. Even if your hardware supports virtualization, check the server BIOS, because some models have the feature switched off by default.
Next, devise a game plan for your virtualization environment. If you're intending to install RHEL on a single server, make sure there is sufficient RAM available (I recommend a minimum of 8 GB, depending on how many VMs will be running). Also, allocate enough storage on a fast hard drive. Don't forget, every VM requires a storage back end to a Virtual Hard Disk. For the best performance, it's a good idea to place the storage back end on a dedicated SCSI drive -- or, even better, a storage area network (SAN). A SAN is a better option because the storage back end won't suffer downtime if a KVM host fails.Installing the KVM framework
Once the hardware is set up, it's time to install the Red Hat operating system. Insert the installation DVD, and start up the installer. When prompted to select which pattern to install, choose the virtualization pattern but don't click Next yet. By default, RHEL 5.4 installs Xen virtualization, but you want to install KVM. To change this, select Customize. Then, deselect Virtualization and check off KVM instead.
After you have installed the OS, there are a couple of caveats. First, RHEL comes with security features enabled by default. Unfortunately, these features may also interact negatively with the virtual machines (VMs)you are about to create. Therefore, it's best to switch off both the firewall a Security-Enhanced Linux initially (unless you are familiar with this process).
Finally, register the server with Red Hat Network to download the necessary patches and apply for support to complete the installation.
In part two of this series, we cover how to install a VM on top of KVM in your Red Hat server.