---
title: "Hypervisor"
url: https://www.daytona.com/compute-glossary/virtualization/hypervisor
---

# Hypervisor

Part of the [Compute Glossary](https://www.daytona.com/compute-glossary.md), section [Virtualization](https://www.daytona.com/compute-glossary/virtualization.md).

Also called Virtual machine monitor, VMM.

A hypervisor is software that creates and runs [virtual machines](https://www.daytona.com/compute-glossary/virtualization/virtual-machine.md), giving each one a share of the hardware of a single physical machine. Each virtual machine runs its own [kernel](https://www.daytona.com/compute-glossary/kernel/kernel.md) and behaves as a separate computer, while the hypervisor decides which physical resources back it. Guests cannot see each other and usually cannot tell how many share their host. The hypervisor also shares out processor time, deciding which guest runs on which core.

Most guest instructions run directly on the physical processor at full speed. The [hardware virtualization](https://www.daytona.com/compute-glossary/virtualization/hardware-virtualization.md) features of the processor stop a guest when it tries an operation that affects the real machine. The hypervisor then carries out a safe version of the operation and resumes the guest. These stops are what makes a guest slower than bare metal, so hypervisors work to keep them rare.

Memory is isolated the same way. On current processors, guest addresses are translated through a second set of page tables that only the hypervisor controls, so a guest cannot reach memory that was not given to it. Older hypervisors kept shadow page tables instead. A guest sees only the devices it was given, either emulated or paravirtual devices served by code the hypervisor controls, or a physical device passed through and fenced off by the IOMMU.

## Type 1 and type 2 hypervisors

Type 1 and type 2 hypervisors are the two classic kinds of hypervisor, told apart by what runs beneath them. A type 1 hypervisor runs directly on the hardware, and a type 2 hypervisor runs as a program on an ordinary operating system. Xen and VMware ESXi are type 1 hypervisors. VirtualBox and VMware Workstation are type 2.

Type 1 hypervisors are the usual choice for servers in datacenters, because only firmware sits between them and the hardware. Type 2 hypervisors are common on laptops and desktops, where virtual machines share the computer with the programs of its user. A type 2 hypervisor relies on the host operating system for drivers and scheduling, which makes it easy to install. That same operating system is extra code that an escaped guest could target.

The line between the two has blurred. [KVM](https://www.daytona.com/compute-glossary/virtualization/kvm.md) is a module of the Linux kernel, so a Linux host with KVM loaded is both a general-purpose operating system and a type 1 hypervisor. Hyper-V blurs it from the other side, slipping under Windows so that Windows itself runs as a privileged guest. The labels now say less about speed or safety than they once did.

## Virtual machine monitors

A virtual machine monitor is the program that sets up each guest and emulates the devices it uses. The term is often used as another name for a hypervisor, and the two are kept apart only when they run as separate parts. The monitor decides what hardware the guest sees, such as how many processors it has and which devices. It also loads the guest kernel or firmware and starts the first vCPU.

When they are kept apart, the hypervisor is the part that uses the virtualization features of the processor, usually inside the kernel. The monitor runs as an ordinary process for each guest and handles the work the hypervisor passes to it, such as disk requests. Splitting the work this way keeps device code out of the kernel, where a bug would be far more dangerous. A crash in a monitor ends one guest, not the host.

A Linux host running KVM is the common example of this split. KVM is the hypervisor inside the kernel, and a separate monitor process, such as QEMU or Firecracker, runs on the host for each guest. Each monitor process can be confined like any other program, with its own user and system call filter. A guest that breaks into its monitor then holds only what that process holds, not the whole host.

## Attack surface

The attack surface of a hypervisor is the code that a guest can reach and try to exploit. A bug in that code can let a guest escape its virtual machine and reach the host or other guests. Such an escape is the worst failure a hypervisor can have, because one tenant then reaches the data of others. On a shared host, that is the risk every guest is exposed to.

Much of that code is device emulation, because every emulated device parses requests that the guest controls. A hypervisor that emulates fewer devices offers fewer places for such a bug, and its code is easier to audit. VENOM, a bug in the floppy disk emulation of QEMU, let a guest break out through a device that most guests never used. Removing such legacy devices is one of the cheapest ways to shrink the surface.

Hypervisors built for [microVMs](https://www.daytona.com/compute-glossary/virtualization/microvm.md) drop most emulated devices for this reason. They gain a smaller attack surface and faster starts, at the cost of running fewer kinds of guest operating systems. Writing monitors in memory-safe languages such as Rust removes another common class of bug. Paravirtual devices help too, because their interfaces are simpler to parse than real hardware.

## Related terms

- [Virtual machine](https://www.daytona.com/compute-glossary/virtualization/virtual-machine.md)
- [Hardware virtualization](https://www.daytona.com/compute-glossary/virtualization/hardware-virtualization.md)
- [KVM](https://www.daytona.com/compute-glossary/virtualization/kvm.md)
- [MicroVM](https://www.daytona.com/compute-glossary/virtualization/microvm.md)
- [Kernel](https://www.daytona.com/compute-glossary/kernel/kernel.md)
