Difference between revisions of "An Overview of Virtualization Techniques"

From Virtuatopia
Jump to: navigation, search
(Shared Kernel Virtualization)
(Kernel Level Virtualization)
Line 31: Line 31:
 
Under kernel level virtualization a specially modified kernel is responsible for running and controlling the various virtual machines.  Guest operating systems must have been compiled for the same hardware as the kernel in which they are running. Examples of kernel level virtualization technologies include user Mode Linux (UML) and KVM. The following diagram provides an overview of the kernel level virtualization architecture:
 
Under kernel level virtualization a specially modified kernel is responsible for running and controlling the various virtual machines.  Guest operating systems must have been compiled for the same hardware as the kernel in which they are running. Examples of kernel level virtualization technologies include user Mode Linux (UML) and KVM. The following diagram provides an overview of the kernel level virtualization architecture:
  
[[Image:Example.jpg|center|Kernel Level Virtualization Diagram]]
+
[[Image:kernel_level_diagram.jpg|center|Kernel Level Virtualization Diagram]]

Revision as of 17:49, 29 May 2008

This book uses the term Virtualization in the context of running multiple operating systems on a single physical computer system. As such, the term does not refer to a single technology, but rather refers to a group of techniques and technologies which achieve operating system virtualization using a variety of different approaches.

When deciding on the best approach to implementing virtualization it is important to have a clear understanding of the different virtualization approaches that are currently available. The purpose of this chapter, therefore, is to describe in general terms the four virtualization techniques in common use today, namely guest operating system, shared kernel, hypervisor and kernel level.

Guest Operating System Virtualization

Guest OS virtualization is perhaps the easiest concept to understand. In this scenario the physical host computer system runs a standard unmodified operating system such as Windows, Linux, Unix or MacOS X. Running on this operating system is a virtualization application which executes in much the same way as any other application such as a word processor or spreadsheet would run on the system. It is within this virtualization application that one or more virtual machines are created to run the guest operating systems on the host computer. The virtualization application is responsible for starting, stopping and managing each virtual machine and essentially controlling access to physical hardware resources on behalf of the individual virtual machines. Some examples of guest OS virtualization technologies include VMWare Server and VirtualBox.

The following figure provides an illustration of guest OS based virtualization.


Guest os diagram.jpg


As outlined in the above diagram, the guest operating systems operate in virtual machines with in the virtualization application which in turn runs on top of the host operating system in the same way as any other application. Clearly, the multiple layers of abstraction between the guest operating systems and the underlying host hardware are not conducive to high levels of virtual machine performance. This technique does, however, have the advantages that no changes are necessary to either host or guest operating systems and no special CPU virtualization support is required.


Shared Kernel Virtualization

Shared kernel virtualization (also known as system level or operating system virtualization) takes advantage of the architectural design of Linux and UNIX based operating systems. In order to understand how shared kernel virtualization works it helps to first understand the two main components of Linux or UNIX operating systems. At the core of the operating system is the kernel. The kernel handles all the interactions between the operating system and the physical hardware. The second key component is the root filesystem which contains all the libraries, files and utilities necessary for the operating system to function. Under shared kernel virtualization the virtual operating systems each have their own root filesystem but share the kernel of the host operating system. This structure is illustrated in the following architectural diagram:


Shared kernel diagram.jpg


Virtualization is made possible by the ability of the kernel to dynamically change the current root filesystem (a concept known as chroot) to a different root filesystem without having to reboot the entire system. In simple terms, shared kernel virtualization is an extension of this capability which allows multiple instances of an operating system to run on a single physical host. Perhaps the biggest single draw back of this form of virtualization is the fact that the guest operating systems must be compatible with the version of the kernel which is being shared. It is not, therefore, possible to run Windows as a guest on a Linux system using the shared kernel approach. Nor is it possible for a Linux guest system designed for the 2.6 version of the kernel to share a 2.4 version kernel.

Linux VServer, Solaris Zones and Containers, FreeVPS and OpenVZ are all examples shared kernel virtualization solutions.

Kernel Level Virtualization

Under kernel level virtualization a specially modified kernel is responsible for running and controlling the various virtual machines. Guest operating systems must have been compiled for the same hardware as the kernel in which they are running. Examples of kernel level virtualization technologies include user Mode Linux (UML) and KVM. The following diagram provides an overview of the kernel level virtualization architecture:

Kernel Level Virtualization Diagram