Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Current »

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 the hostname and other network configurations for the new server, especially:
    • Hostname
    • IP address
    • Netmask
    • Gateway
    • DNS servers
  • It's possible, but not recommended, to use DHCP for servers.
    • If you use DHCP, be prepared to rename and reset the network configurations for the host before running any services.
  • Download and create an installation DVD for RHEL 6 or CentOS 6, as appropriate.

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.

  • Use RAID1 with only two disks
  • Use RAID5 or 6 with more disks.

Configure and update the BIOS and other hardware firmware

  • Update the BIOS and any relevant firmware before starting, if at all feasible. Even hardware that is brand new often has an out of date BIOS or RAID card drivers.
  • Configure the BIOS to enable hardware virtualization.
  • Configure the BIOS boot order to boot from the hard drive, first.
  • Record any necessary BIOS changes. 

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.

  • Review the TUSK published KVM server configuration.
  • Boot from the DVD.
  • Select the "install" option.
  • Hit "Tab" to edit the command line.
    linux ksdevice=eth0 ip=[ipaddress] netmask=[netmask] gateway=[gateway] dns=[dns-server] ks=http://down.tusk.tufts.edu/ks/kvm-server.cfg
    
  • Warning: some combinations of hardware and kernel report the network devices as "em0", not "em0".
    • If this occurs, you may have to manually configure the network.
  • Double check the disk partitioning for your local needs.
  • Manually select a new root password.
  • When the installation is complete, reboot.

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.

  • Boot from the DVD.
  • Install only the basic components for KVM servers.
  • Reserve only 10 Gig for the basic OS installation.
    • All other disk space should be available in the LVM configuration.
    • Set up most of the rest of the LVM for VM use, mounted at /varlib/libvirt/images.
    • Remember that It's much easier to grow partitions than shrink them.
  • Double check the disk partitioning.
  • Manually select a new root password.
  • When the installation is complete, reboot.

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.

  • No labels