Difference between revisions of "An Overview of Virtualization Techniques"
(→Kernel Level Virtualization) |
(→Kernel Level Virtualization) |
||
Line 29: | Line 29: | ||
== Kernel Level Virtualization == | == 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: | + | 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:kernel_level_diagram.jpg|center|Kernel Level Virtualization Diagram]] | [[Image:kernel_level_diagram.jpg|center|Kernel Level Virtualization Diagram]] | ||
+ | |||
+ | |||
+ | == Hypervisor Virtualization == | ||
+ | |||
+ | Under hypervisor virtualization a program known as a hypervisor runs directly on the hardware of the host system. The task of the hypervisor is to handle protected and privileged CPU requests from the virtual machines and also to act as an intermediary between the hardware resources and the virtual machines. | ||
+ | |||
+ | In addition to the virtual machines, an administrative operating system also runs on top of the hypervisor allowing the virtual machines to be managed by system administrators. | ||
+ | |||
+ | At the time of writing there are three different types of hypervisor based virtualization: | ||
+ | |||
+ | - ''Paravirtualization'' - Under paravirtualization the guest operating systems must be modified specifically to run on the hypervisor. This typically restricts support to open source operating systems such as Linux and excludes proprietary operating systems such as Microsoft Windows. The ability of the guest system to communicate directly with the hypervisor results in greater performance levels than other virtualization approaches. | ||
+ | |||
+ | - ''Full Virtualization'' - Full virtualization provides support for unmodifed guest operating systems. In this scenario, the hypervisor provides emulation to handle privileged and protected CPU operations made by unmodified guest operating systems. As a result of this emulation the performance levels are lower than those provided by paravirtualization. | ||
+ | |||
+ | - ''Hardware Virtualization'' - Hardware virtualization is a hypervisor based solution that leverages Intel VT and AMD-V CPU virtualization support, using features of these technologies to handle privileged and protected CPU operations of unmodified guests. |
Revision as of 18:21, 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.
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 (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:
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:
Hypervisor Virtualization
Under hypervisor virtualization a program known as a hypervisor runs directly on the hardware of the host system. The task of the hypervisor is to handle protected and privileged CPU requests from the virtual machines and also to act as an intermediary between the hardware resources and the virtual machines.
In addition to the virtual machines, an administrative operating system also runs on top of the hypervisor allowing the virtual machines to be managed by system administrators.
At the time of writing there are three different types of hypervisor based virtualization:
- Paravirtualization - Under paravirtualization the guest operating systems must be modified specifically to run on the hypervisor. This typically restricts support to open source operating systems such as Linux and excludes proprietary operating systems such as Microsoft Windows. The ability of the guest system to communicate directly with the hypervisor results in greater performance levels than other virtualization approaches.
- Full Virtualization - Full virtualization provides support for unmodifed guest operating systems. In this scenario, the hypervisor provides emulation to handle privileged and protected CPU operations made by unmodified guest operating systems. As a result of this emulation the performance levels are lower than those provided by paravirtualization.
- Hardware Virtualization - Hardware virtualization is a hypervisor based solution that leverages Intel VT and AMD-V CPU virtualization support, using features of these technologies to handle privileged and protected CPU operations of unmodified guests.