This article is excerpted from Beginning Ubuntu Server Administration: From Novice to Professional,
One of the hottest new technologies for servers is virtualization, which allows you to install multiple instances of one or more operating systems on one machine. This is ideal especially for servers with a low average load because, instead of configuring a separate physical box for every single instance of an operating system you need, you just run multiple instances of one or more operating systems on one machine. Unfortunately, it's a jungle out there: There are many different and competing virtualization options. This chapter will provide an overview of the possibilities that virtualization offers. You'll also learn how to set up Ubuntu Server for virtualization.
Understanding Virtualization
In this section, you'll read about the different solutions that offer virtualization, and you'll explore its two main approaches: full virtualization and paravirtualization.
Virtualization Solutions Currently, many solutions are available to work with virtualization, but three of them are particularly important:
- VMware
- Xen
- KVM (Kernel-based Virtual Machine)
As for the other solutions, you won't often find them in a data center because of their considerable limitations, which include a lack of support, a limited selection of operating systems that can be installed as virtual machines, and a severe performance penalty when using them. For these reasons, I'll ignore them here.
Of the three important technologies, VMware is the current market leader, probably because it offers a commercial solution to virtualize many different operating systems. The most important VMware version in the data center is VMware ESX, which offers a tuned Linux kernel that integrates Virtual Machine Manager. However, if you want to use VMware ESX as a virtualization platform today, you'll have to do it by running Ubuntu Server as a virtualized "guest" operating system within the VMware environment. There's currently no way to combine VMware ESX and Ubuntu Server as a virtualization "host" platform.
Note: In the Xen community, the words host and guest are avoided when discussing operating system. I'll explain why in "Installing Virtual Machines Using Xen" later in this chapter. However, for clarity's sake, I'll use these words anyway, but with the following definitions. The host is the physical machine that offers virtualization services, and the host may or may not run a specialized operating system to offer these services. A guest is a virtual machine without any management responsibilities with regard to virtualization.
The second important player in the field of virtualization is KVM, which offers virtualization
support in the Linux kernel itself. To use it, you'll need the kvm.ko
kernel module for
Linux, a CPU that has built-in virtualization support, and of course a kernel that supports
KVM virtualization. (The 2.6.20 kernel is the first Linux kernel to do this.) To create virtual
machines with KVM, you'll use the /dev/kvm
interface, and this functionality requires a
modified version of the QEMU program. QEMU was originally developed as an open-source
virtualization product, but it never became very successful. However, its tools are still very
useful, and QEMU tools and solutions are used in both KVM and Xen environments. Currently,
most operating systems are supported on a KVM virtual host, provided the operating
system runs on the same processor architecture.