Introduction to virtualization

From OpenVZ Virtuozzo Containers Wiki
Revision as of 14:59, 11 August 2006 by Mmestnik (talk | contribs) (Virtual machines (VMs))
Jump to: navigation, search

Virtualization is a framework or methodology of dividing the resources of a computer into multiple execution environments. Virtualization techniques create multiple isolated partitions — Virtual Machines (VM) or Virtual Environments (VEs) — on a single physical server.

Techniques

There are several kinds of virtualization techniques which provide similar features but differ in the degree of abstraction and the methods used for virtualization.

Virtual machines (VMs)

Virtual machines emulate some real or fictional hardware, which in turn requires real resources from the host (the machine running the VMs). This approach, used by most system emulators, allows the emulator to run an arbitrary guest operating system without modifications because guest OS is not aware that it is not running on real hardware. :( The main issue with this approach is that some CPU instructions require additional privileges and may not be executed in user space thus requiring a virtual machines monitor (VMM) to analyze executed code and make it safe on-the-fly. Hardware emulation approach is used by VMware products, Parallels and Microsoft Virtual Server. :(

) You changed topics in mid-paragraph. These emulators are used to create virtual machines, DosBOX

and Bochs. Virtual Machine emulators are able to run x86 code and OSs on a wide variaty of computer hardware, I.E. ppc/sparc/alpha.

The others you mention use cpu virtualization, Rather, guest code is executed as-is in a safe VM environment managed by a VM monitor. Guest kernel code is executed at a less priviliged level, causing privileged operations to generate exceptions which are managed by the VM monitor. Like the abovementioned VMware and Plex86. Unlike bochs and dosbox, instructions are not translated(emulation) into native code. This means that vmware and plex can only run x86 OSs on x86 hardware. :)

Paravirtualization

This technique also requires a VMM, but most of its work is performed in the guest OS code, which in turn is modified to support this VMM and avoid unnecessary use of privileged instructions. The paravirtualization technique also enables running different OSs on a single server, but requires them to be ported, i.e. they should "know" they are running under the hypervisor. The paravirtualization approach is used by products such as Xen and UML.

Virtualization on the OS level

Most applications running on a server can easily share a machine with others, if they could be isolated and secured. Further, in most situations, different operating systems are not required on the same server, merely multiple instances of a single operating system. OS-level virtualization systems have been designed to provide the required isolation and security to run multiple applications or copies of the same OS (but different distributions of the OS) on the same server. OpenVZ, Linux-VServer and Solaris Zones are examples of OS-level virtualization.

Short comparison

The three techniques differ in complexity of implementation, breadth of OS support, performance in comparison with standalone server, and level of access to common resources. For example, VMs have wider scope of usage, but poor performance. Para-VMs have better performance, but can support fewer OSs because of need to modify the original OSs.

Virtualization on the OS level provides the best performance and scalability compared to other approaches. Performance difference of such systems can be as low as 1…3%, comparing with that of a standalone server. Virtual environments are usually also much simpler to administer as all of them can be accessed and administered from the host system. Generally, such systems are the best choice for server consolidation of same OS workloads.

External links