A virtual machine (VM) is an operating system (OS) or application environment that is installed on specialized software called a virtual machine monitor (VMM) that emulates the underlying hardware (e.g. a PC, server, mobile device, etc.) or operating environment. The VMM enables running multiple virtual machines on the same hardware resources. Virtual machines are generally sandboxed from one another by the underlying emulator, and each machine can run independently and in isolation from the other machines – for example, one machine might run a Linux operating system and another Windows.
VMMs can be implemented in different ways. A type II VMM is one that runs on top of a hosting operating system and supports running higher level virtual machines. Examples of type II VMMs include the JavaVM and.Net environment, which allows running application code, and the VirtualBox and Microsoft HyperV, which allows running full operating systems as virtual machines on top of the host OS. Type II VMMs monitor their virtual machines and redirect requests for resource to appropriate APIs in the host OS.
A type I VMM is one that runs directly on the hardware without the need for hosting an operating system. Type I VMMs are also known as ‘hypervisors’. Examples of type I VMMs include Xen and VMWare ESX. Type I VMMs monitor their virtual machines and redirect requests for resource to the hardware abstraction layer.
Virtual machines allow for more efficient utilization of the underlying hardware and are easier to manage because they are software-based. They can be easily copied, moved and reassigned between host servers to optimize hardware utilization. Running virtual machines requires management, as they can compete for the resources of the host.
Virtual machines are becoming more common with the evolution of virtualization technology. Some of the advantages of a virtual machine include allowing multiple operating system environments on a single physical computer, and are easier to manage and maintain when compared to physical machines. Their main drawback is that they are not as efficient as a physical computer because the hardware resources are distributed in an indirect way.