Install KVM Hypervisor For TUSK

KVM is a robust virtualization technology, strongly supported by Red Hat and easily scaled up to commercial levels of use on CentOS or RHEL. These notes are aimed at generic installation of CentOS 6 or RHEL 6 for such servers, aimed specifically at TUSK 4 or OpenTUSK.

Determine the Server Network Configuration First

Get installation media

RHEL requires a license, and DVD installation media. It's possible to do with a network boot CD and local RHEL mirror, but setting that up is beyond the scope of these notes.

CentOS can be installed with installation DVD's, or with a the CentOS-6.3-x86_64-netinstall.iso CD image from a local mirror and the URL of a local CentOS mirror. That's easier, but also beyond the scope of these notes.

Configure the host with hardware RAID

Software RAID can work, but it's awkward. Server hardware should support hardware RAID, and it's invaluable when a disk fails on a virtualization server.

Configure and update the BIOS and other hardware firmware

Install RHEL 6 or CentOS 6

RHEL 6 or CentOS 6 is strongly preferred to CentOS 5 for this hypervisor, and x86_64 is absolutely necessary to be able to virtualize both i386 and x86_64 guests.

Install from KickStart

It's much easier to install RHEL 6 or CentOS with the "kickstart" tool, if network access is available when installing the host.

Install manually if necessary

If an external network is unavailable, or if your server is on trunked VLAN's, kickstart will not be available. Review the kickstart file listed above, and follow these manual steps.

Configure Pair Bonding and Bridges for KVM Hypervisor

Configuring KVM bridges, especially with pair bonding is a manual process.

Tagged VLANs

If your environment uses tagged VLAN's, see:

Note that taged VLAN's are not suggested: if you need multiple VLAN's, it's sually safer and more reliable to install additional network ports and use pairs of network ports for individual VLAN's.

Normal VLANs

For normal KVM hypervisor environments, see:

Install KVM Software

Critical software for running KVM is in the kickstart file, but for manual OS installations needs to be installed by hand. Run these commands to install them.

yum -y install libvirt
yum -y install qemu-img
yum -y install qemu-kvm
yum -y install qemu-kvm-tools
yum -y install virt-manager
yum -y install virt-viewer
yum -y install xorg-x11-xauth # Allows X sessions over SSH

Configure shared NFS space as needed

KVM based virtual hosts can be migrated from one KVM server to another, with the host live, if they have a shared space to store the DISK images. This setup depends heavily on the local storage environment, but the obvious place to mount the storage is at /var/lib/libvirt/images, where KVM expects to find them.