Debian Squeeze KVM Virtualization Guide
Debian Squeeze (6.0) KVM Virtualization Guide
- Basic Debian Linux Installation, Configuration and Administrations skills.
- NetApp DATA ONTAP Storage Controller
- Server hardware platform with Hardware Virtualization Extension support
o Intel VT
o AMD V
This document can also be applied to other SAN topics like FC, FCoE, DM-MP, SAN Boot as well as basic troubleshooting information. Issues, Feedback, Comments, Suggestions: Reach us on the Web Forum or the Mailing List.
For information on installing and setting up third-party hardware and applications such as HBAs or Veritas Storage Foundation, see the documentation that accompanies that product. For information on Debian (iSCSI) Storage Configuration, please visit the following link http://linux.netapp.com/docs/debian/iscsi-multipath-configuration-guide
This guide will focus on the KVM Virtualization components as shipped with Debian 6.0 Squeeze
Virtualization support for Debian 6.0
Server virtualization is a method of dividing computer resources into multiple, isolated environments. In a virtual ecosystem, a host operating system runs one or more guest virtual machines in a contained environment. Each guest virtual machine (VM) has access to the host's hardware and is controlled by the hypervisor. You can configure guest VMs in full and para-virtualized modes.
KVM is a full virtualization solution for Linux on x86 hardware that contains virtualization extensions (Intel VT or AMD-V). It consists of a loadable kernel module (kvm.ko) that provides the core virtualization infrastructure and a processor specific module (kvm-intel.ko or kvm-amd.ko).
The KVM Virtualization solution comprises of the following components:
- virt-manager: desktop application for managing virtual machines
It presents a summary view of running domains and their live performance & resource utilization statistics. A detailed view presents graphs showing performance & utilization over time. Ultimately it will allow creation of new domains, and configuration & adjustment of a domain's resource allocation & virtual hardware. Finally an embedded VNC client viewer presents a full graphical console to the guest domain.
- libvirtd: programs for the libvirt library
libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). The library aims at providing a long term stable C API for different virtualization mechanisms. It currently supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.
- KVM kernel modules: The core KVM kernel component as shipped in your Debian distribution
- qemu-kvm userspace utilities: KVM userspace component
Note: KVM leverages the Linux kernel's infrastructure and extends it to serve as a full-fledged hypervisor. Thus, any limitations that apply to the Linux kernel also apply to the KVM hypervisor.
Para-virtualization support involves providing a para-virtualized network driver, a para-virtualized block I/O device (disk) driver, and a balloon driver for virtual memory management and CPU optimization for Linux guests. KVM provide limited para-virtualization support for guest VMs with the virtio framework.
Guest OS Virtual Hard Disk (VHD) require an aligned disk geometry for best performance. It must be aligned with the underlying LUN for best performance. Disks use geometry to identify themselves and their characteristics to the upper-layer operating system. The upper-layer operating system uses the disk geometry information to calculate the size of the disk and partitions the disk into predetermined addressable blocks. Just as with physical disks, LUNs report disk geometry to the host (physical host, virtualization host, or the VM, depending on the mode of usage) so that it can calculate space and partition the LUN into addressable blocks. For more detailed information on block mis-alignment, please refer to our technical report at: http://media.netapp.com/documents/tr-3747.pdf
For Linux Guest VMs in use in a Production Environment with mis-alignment related performance issues, you might want to have a look at our fix-alignment utility at: http://linux.netapp.com/tools/fix-alignment
Tasks for configuring KVM on a Debian host
Task 1: Make sure the prerequisites for installing and setting up the Debian Operating System have been met. Check the Debian Installation Guide and the iSCSI Setup Guide for Debian:
· Install virt-manager, libvirtd, qemu-kvm
aptitude install virt-manager libvirt-bin qemu-kvm
- Ensure libvirt-bin is running
# /etc/init.d/libvirt-bin status
Checking status of libvirt management daemon: libvirtd running
- The default install of libvirtd does not listen over TCP. To access the libvirt manager over network, set listen_tcp = 1 in /etc/libvirt/libvirtd.conf
- You can use the virt-manager GUI Interface to interact with the KVM hypervisor.