The software that creates a virtual machine environment in a computer (for the fundamental concept, see virtual machine
). In a regular, non-virtual environment, the operating system is the master control program, which manages the execution of all applications and acts as an interface between the applications and the hardware. The OS has the highest privilege level in the machine, known as "ring 0" (see ring
In a virtual machine environment, the virtual machine monitor (VMM) becomes the master control program with the highest privilege level, and the VMM manages one or more operating systems, now referred to as "guest operating systems." Each guest OS manages its own applications as it normally does in a non-virtual environment, except that it has been isolated in the computer by the VMM. Each guest OS with its applications is known as a "virtual machine" and is sometimes called a "guest OS stack."
What Gets Virtualized
Since a guest OS is not in control of the hardware, the virtual machine monitor (VMM) acts as a go-between. It intercepts calls to the peripheral devices and memory tables (see virtual memory
) from each guest and intercedes on their behalf. When a peripheral device creates an interrupt, such as when a disk write has been completed, the VMM injects that interrupt into the appropriate guest OS.
Depending on the platform and VMM software, a guest OS may run intact in a virtual machine environment without modification, or its source code may have to be modified (see paravirtualization
Virtual Machine Monitor Types
Following are the three common VMM architectures, showing the relationship between the VMM, the guest OS and device drivers. All three methods can be paravirtualized (changes in the guest OS are made) or fully virtualized (no changes in the guest OS). The term "hypervisor" is used to refer to the virtual machine monitor component nearest the hardware.
This is a popular method that enables a VMM to be installed onto an existing, running computer, and guest operating systems typically run without modification. The VMM kernel runs in ring 0 along with the host OS. An access to an I/O device is redirected by the VMM kernel to virtual drivers in a user level monitor (ULM), which calls the native programming interface (API) of the host OS for completion. Examples of OS-hosted VMMs are VMware Workstation, VMware Server, Parallels Workstation and Parallels Desktop for Mac.
The hypervisor model provides the most control, flexibility and performance in a virtual machine environment, because it is not subject to any limitations of a host OS. It relies on its own software drivers for the hardware for ultimate control; however, they may limit portability to another hardware platform if the hypervisor does not support the peripherals on that platform. Examples of this method are VMware ESX and IBM's mainframe z/VM.
The service VM combines the robustness of the hypervisor model with the flexibility of the hosted model, which uses an existing OS. In order to take advantage of the many drivers available in a popular operating system, it runs that operating system not as a guest, but as a component of the hypervisor in a separate service virtual machine. Xen, XenServer and Hyper-V are examples of the service VM approach. See virtual machine