virtual machine

virtual machine (VM)

What is a virtual machine (VM)?

        A virtual machine (VM) is an operating system (OS) or application environment installed on software that imitates dedicated hardware. The end user's experience when using a VM is equivalent to that of using dedicated hardware.

How do VMs work?

        A VM provides an isolated environment for running its own OS and applications, independent from the underlying host system or other VMs on that host. A VM's OS, commonly referred to as the guest OS, can be the same as or different from the host OS and the OSes of other VMs on the host.


        A single computer can host multiple VMs running different OSes and applications without affecting or interfering with each other. Although the VM is still dependent on the host's physical resources, those resources are virtualized and distributed across the VMs and can be reassigned as necessary. This makes it possible to run different environments simultaneously and accommodate fluctuating workloads.


        From the user's perspective, the VM operates much like a bare-metal machine. In most cases, users connecting to a VM are not aware that they are using a virtual environment. Users can configure and update the guest OS and its applications as necessary and install or remove new applications without affecting the host or other VMs. Resources such as CPUs, memory and storage appear much as they do on a physical computer, although users might run into occasional glitches, such as not being able to run an application in a virtual environment.

The role of hypervisors in virtualization

        Hosting VMs on a computer requires a specialized type of software called a hypervisor, which manages resources and allocates them to VMs. The hypervisor also schedules and adjusts how resources are distributed based on the configuration of the hypervisor and VMs, including reallocating resources as demands fluctuate.

        The hypervisor emulates the computer's CPU, memory, hard disk, network and other hardware resources, creating a pool of resources to allocate to individual VMs according to their specific requirements. The hypervisor can support multiple virtual hardware platforms that are isolated from each other, enabling VMs to run Linux and Windows Server OSes on the same physical host.

        Most hypervisors do not require special hardware components. However, the computer that runs the hypervisor must have the resources necessary to support VMs, the hypervisor's operations and the host's own operations.

Most hypervisors fall into one of two categories: type 1 or type 2.

Type 1 hypervisors

        Also known as bare-metal hypervisors, Type 1 hypervisors run directly on the physical host machine and have direct access to its hardware. Type 1 hypervisors typically run on server computers and are considered more efficient and better performing than Type 2 hypervisors, making them well suited to server, desktop and application virtualization. Examples of Type 1 hypervisors include Microsoft Hyper-V and VMware ESXi.



Type 2 hypervisors

        Also known as hosted hypervisors, Type 2 hypervisors are installed on top of the host machine's OS, which manages calls to the hardware resources. Type 2 hypervisors are generally deployed on end-user systems for specific use cases -- for example, a developer creating a specific environment for building an application or a data analyst testing an application in an isolated environment. Examples of Type 2 hypervisors include VMware Workstation and Oracle VirtualBox.


Virtualization and Protection Rings:



Process vs. system VMs

        VMs are often categorized by the type of hypervisor that manages them or by the type of workloads they support. However, VMs can also be categorized as process or system VMs.

Process VMs

        A process VM is a temporary, platform-independent programming environment for executing a single process as an application. The environment provides a high-level abstraction that masks the underlying hardware or OS. A process VM is created when the process starts and destroyed when the process ends. Two common examples of process VMs are Java virtual machines, which run programs compiled from Java, and the Common Language Runtime, which is part of Microsoft's .NET Framework.

System VMs

        A system VM is a fully virtualized environment hosted on a physical server that runs its own OS. The VM shares the host's physical resources but provides a complete environment for running applications and services, similar to a physical machine without the overhead. System VMs use a hypervisor to virtualize the hardware resources and make them available to VM environments. Common examples of system VMs include those supported by virtualization platforms such as VMware vSphere and Microsoft Hyper-V.


Comments

Popular Posts