Palegray.net - Code, Linux/BSD, Tech, and more
Home Projects Tutorials Forums About Contact

Debian 6 (Squeeze) KVM Virtualization Howto

By Philip C. Paradis (Twitter: @pcparadis)
Published: February 21, 2011

Introduction and Prerequisites

Virtualization makes it possible to run multiple operating systems simultaneously on a computer. This is frequently utilized by VPS (Virtual Private Server) and "cloud-based" hosting providers to efficiently offer services with the benefits of dedicated hosting, at a fraction of the cost of operating a physical dedicated server for each customer. KVM is a powerful virtualization system that makes the operation and management of VMs extremely easy, and will be used as the foundation of this tutorial. KVM is similar in some respects to other virtualization technologies, such as Xen, VMware, and VirtualBox.

This guide will show you how to set up your own virtualization server, which can run multiple virtual machine (VM) servers. Debian 6 (Squeeze) Linux will be used for the host operating system, with additional Debian 6 guests running as VMs. Such a setup makes a great platform for developing and testing software, as you can easily deploy new VMs as necessary to support your development needs, at no additional cost. You may also use such a setup for production hosting purposes, although you may wish to strongly consider using an established provider such as Linode for such needs. In particular, providers like Linode excel at maintaining the hardware and networks that your production systems rely on, freeing you to focus on development and growth instead of the underlying platform.

To get started, you'll need a computer to act as the VM host server. Your machine must support either AMD virtualization (AMD-V) or Intel virtualization (VT-x) hardware virtualization extensions. Many modern multi-core AMD and Intel desktop processors have the required support, although in some cases you may need to enable the support in your system's BIOS. Here are some minimum specifications for a host server:

Here are some recommended specifications for a host server:

The host server used to develop this tutorial has a quad-core AMD Athlon X4 processor, 8 GB RAM, a 100 GB SATA hard drive for the host operating system, and two 500 GB SATA hard drives configured in RAID-1 via a PCI RAID card to house virtual machine LVM volumes. The machine was assembled from components bought from newegg.com for approximately $500 USD.

Continue: Install Debian 6 (Squeeze) on the Server