Hypervisors
The layer that splits one physical computer into several virtual ones, each with its own CPUs, memory, devices and kernel.
10 technologies on this page ↓How it works
A hypervisor, also called a virtual machine monitor (VMM), gives each guest virtual CPUs, a slice of memory and a set of devices. Ordinary guest instructions run directly on the real CPU. When a guest does something only the owner of the machine may do, such as touching a device or changing page tables, the CPU stops it and hands control to the hypervisor: a “VM exit”. The hypervisor emulates the operation, then resumes the guest. Modern CPUs build this in (Intel VT-x and AMD-V on x86, exception level EL2 on Arm), and a second layer of page tables (Intel EPT, AMD NPT) maps each guest’s memory onto real memory in hardware. Devices come in three flavors: fully emulated copies of real hardware, paravirtual devices such as virtio that the guest knows are virtual, and real devices passed straight through to one guest.
A stage manager during a play. The actors (guests) perform on their own, and the audience never sees the manager. But the moment an actor needs a prop, a light change or a door that’s locked, the play pauses for a beat, the manager sorts it out, and the scene carries on.
Reach for it when
- Running several operating systems, or several kernel versions, on one physical server
- Isolating tenants who don’t trust each other: each one gets its own kernel and a hardware-enforced boundary
- Building your own private cloud or lab, e.g. Proxmox VE on KVM
- Moving running workloads off a host for maintenance without restarting them (live migration)
Think twice when
- You only need to separate processes you trust on one kernel: containers start faster and share memory more easily
- Latency-critical, I/O-heavy work where every VM exit hurts: use bare metal, or pass the device straight through
- Inside a cloud VM that doesn’t expose virtualization extensions: on AWS nested virtualization works only on some instance families, and Compute Engine allows only KVM as the nested hypervisor
A real example
A provider must patch the host kernel under 40 running VMs without rebooting customers. It live-migrates each VM to another host: memory is copied while the guest keeps running, pages the guest changes are sent again, and finally the guest pauses for a short “blackout” while the last state moves. Compute Engine does this during routine host maintenance, and its docs warn that the guest clock can appear to jump forward by up to 5 seconds during blackout. The original live-migration paper, built on Xen in 2005, measured downtimes as low as 60 ms.
Technologies
Specific products, and what each does differently.
Cloud HypervisorOpen sourceA Rust virtual machine monitor for modern cloud VMs on KVM or Microsoft’s hypervisor: virtio devices only, plus hotplug, VFIO passthrough, live migration, snapshots and Windows guests.KVM (Kernel-based Virtual Machine)Open sourceThe hypervisor built into the Linux kernel: it runs guest code directly on the CPU through `/dev/kvm`, and leaves device emulation to a user-space program such as QEMU or Firecracker.
libvirtOpen sourceA stable API, daemon and `virsh` command line for managing virtual machines, storage and networks, with drivers for QEMU/KVM, Xen, LXC, Cloud Hypervisor, VMware ESX, Hyper-V and more.
Xen Project hypervisorOpen sourceThe open-source type-1 hypervisor from Cambridge that ran the first Amazon EC2 instances: a small microkernel-style core that boots first, with drivers and management in a privileged VM called dom0.
FirecrackerOpen sourceThe open-source microVM monitor AWS built for Lambda: a full VM boundary that boots in under 125 ms.Mainly MicroVMs Cloud Hypervisor | Open source | Cloud Hypervisor project (Linux Foundation), started at Intel | Apache 2.0 and BSD-3-Clause | 2026-10-11 |
| KVM (Kernel-based Virtual Machine) | Open source | Linux kernel community | GPL 2.0 | 2026-10-11 |
libvirt | Open source | libvirt project (started at Red Hat) | LGPL 2.1 or later (library); some tools GPL 2.0 or later | 2026-10-11 |
| Commercial product | Microsoft | Proprietary | 2026-10-11 | |
| Open source | Oracle | GPLv3 for the base package and Guest Additions (GPLv2 before 7.0); the optional Extension Pack is proprietary: free under the PUEL for personal and educational use, a paid Enterprise license otherwise | 2026-10-11 | |
| Open source | Proxmox Server Solutions GmbH | AGPLv3 | 2026-10-11 | |
| Open source | QEMU project (started by Fabrice Bellard) | GPL 2.0 | 2026-10-11 | |
| Commercial product | Broadcom (VMware) | Proprietary | 2026-10-11 | |
Xen Project hypervisor | Open source | Xen Project (Linux Foundation), started at the University of Cambridge | GPL-2.0 (version 2 only) | 2026-10-11 |
Firecracker | Open source | Amazon Web Services | Apache 2.0 | 2026-10-05 |
What each provider calls it
- AWS
- Nitro Hypervisor (built on KVM) under EC2; Xen on older instance types; Firecracker under Lambda
- Google Cloud
- Compute Engine’s security-hardened, KVM-based hypervisor
- Azure
- The Azure hypervisor, based on Windows Hyper-V
- Open source & others
- KVM, Xen, QEMU, Cloud Hypervisor, Firecracker, Proxmox VE, VirtualBox, bhyve
Inside a VM exit#
The classic recipe is “trap and emulate”: run the guest’s kernel with reduced privileges, let every privileged instruction fault, and emulate it in the monitor. Popek and Goldberg showed in 1974 that this works on any CPU where every instruction that can reveal or change the machine’s state is also privileged. The original x86 broke that rule: some sensitive instructions silently behaved differently instead of trapping. VMware worked around it in 1999 by rewriting guest kernel code on the fly (binary translation), and Xen in 2003 by modifying the guest kernel to call the hypervisor directly (paravirtualization).
Intel VT-x and AMD-V fixed the hardware. They add a guest mode with all the usual privilege levels, plus a control structure where the hypervisor says which events should force an exit. On an exit the CPU saves the guest’s state, loads the hypervisor’s, and reports why it stopped, e.g. an I/O port access with its port number, width and direction. The hypervisor handles it and re-enters the guest. AMD’s SVM (AMD-V) and Intel’s VT-x work the same way. Exits are expensive: on a Pentium 4, VMware measured 2,030 cycles to trap and emulate one rdtsc instruction, against 216 cycles for its translated version. First-generation VT-x and AMD-V also left memory virtualization to software (“shadow” page tables), which is why second-level address translation followed: EPT and NPT let the CPU walk the guest’s page tables and the hypervisor’s guest-physical to host-physical map in hardware.
On Linux the loop is visible in KVM’s API. A user-space program opens /dev/kvm, creates a VM and its vCPUs, maps guest memory from its own address space, and calls KVM_RUN. The kernel enters guest mode and handles many exits itself, such as external interrupts and page faults. When the guest touches an I/O port or a memory-mapped device KVM can’t satisfy, KVM_RUN returns with KVM_EXIT_IO or KVM_EXIT_MMIO, and the user-space VMM emulates the device before calling KVM_RUN again. On 64-bit Arm the hypervisor runs at exception level EL2, and Linux asks to be booted there to use the virtualization extensions.
Three ways to give a guest a device#
| Approach | How it works | What the guest needs | Trade-off |
|---|---|---|---|
| Full emulation | The VMM imitates a real piece of hardware, register by register, e.g. the Intel e1000 network card in QEMU’s default PC | Nothing special: the driver for the real card | Runs any OS, but each register access is a VM exit, and emulating I/O means leaving guest mode, which is costly |
| Paravirtual (virtio, Hyper-V VMBus) | The device is designed for virtual machines: the guest driver puts requests on queues (virtqueues) that the host side processes | A virtio driver, or Hyper-V’s integration services | Skips imitating real hardware, which is more efficient, and gives one standard interface; the guest must have the driver |
| Passthrough (VFIO, SR-IOV) | A real PCI device is handed to one guest, with the IOMMU (Intel VT-d, AMD-Vi) confining its DMA to that guest’s memory. SR-IOV splits one card into several virtual functions | The normal bare-metal driver for that device | The lowest latency and highest bandwidth, but the device (or virtual function) belongs to one VM and needs IOMMU support |
Type 1, type 2, and why the line blurs#
Robert Goldberg’s 1973 Harvard thesis split monitors into two kinds. In Type I, “the VMM runs on a bare machine”. In Type II, “the VMM runs on an extended host, under the host operating system”. ESXi and Xen are the textbook type 1 examples: ESXi installs on the physical server as the platform for VMs, and Xen calls itself a type-1 or bare-metal hypervisor. VirtualBox’s manual calls it a hosted, type 2 hypervisor that needs an existing OS.
Real systems mix the two. Xen boots first, but a privileged first guest, Domain0, runs the management software. Hyper-V sits directly on the hardware, yet it needs a root partition running Windows, which owns the physical devices and serves the other partitions’ device requests over VMBus. KVM turns the Linux kernel itself into the hypervisor: each VM is an ordinary process and each vCPU a thread, so top and kill work on them. Apple’s Hypervisor framework does the same on macOS, from a sandboxed user-space app.
That is why people now separate the hypervisor (the privileged part that runs guests on the CPU and isolates memory) from the VMM (the user-space process that sets up the VM and emulates its devices). On Linux, KVM is the hypervisor and QEMU, Firecracker or Cloud Hypervisor is the VMM. QEMU can also run with no hypervisor at all, emulating the whole CPU in software with TCG, as in the snippet above. Cloud Hypervisor runs on either KVM or the Microsoft Hypervisor (MSHV).
The main hypervisors and VMMs#
| Name | What it is | Made by | License | Where you meet it |
|---|---|---|---|---|
| KVM | Hypervisor built into the Linux kernel; needs a user-space VMM | Linux kernel community (started at Qumranet) | GPL-2.0, as part of Linux | AWS Nitro Hypervisor, Compute Engine, Proxmox VE, most Linux virtualization |
| Xen | Type 1, with a privileged Domain0 guest | Xen Project (a Linux Foundation project) | GPL-2.0 | EC2 from 2006 until Nitro; server and embedded virtualization |
| VMware ESXi | Type 1, installed on the physical server | VMware, now part of Broadcom | Proprietary; the free vSphere Hypervisor 8 is unsupported and for non-production use only | vSphere data centers |
| Microsoft Hyper-V | Type 1 under a Windows root partition | Microsoft | Proprietary, part of certain x64 editions of Windows | Windows Server, Windows, Azure |
| QEMU | VMM and machine emulator: uses KVM, Xen or Apple’s Hypervisor framework, or emulates the CPU in software | QEMU project | GPL-2.0 | Paired with KVM on Linux; running other CPU architectures |
| Firecracker | Minimal VMM on KVM, one microVM per process | Amazon Web Services | Apache 2.0 | AWS Lambda |
| Cloud Hypervisor | VMM on KVM or MSHV for modern cloud guests | Cloud Hypervisor project | Apache 2.0 and BSD-3-Clause | Cloud workloads on modern 64-bit guests with virtio devices |
| Oracle VirtualBox | Type 2 (hosted) application | Oracle | GPLv3 base package; the Extension Pack is under the PUEL, free only for personal and educational use | Desktops and laptops, local test VMs |
| bhyve | Hypervisor in the FreeBSD base system since 10.0 | FreeBSD project | BSD | FreeBSD hosts |
| Apple Hypervisor framework | macOS API for running VMs from user space, without kernel extensions | Apple | Proprietary, part of macOS | Virtualization apps on Macs; QEMU’s macOS accelerator |
Running many VMs: migration, snapshots, overcommit, nesting#
Because a VM’s whole state is memory plus device state held by the hypervisor, it can be moved or saved. Live migration (Clark et al., 2005) copies all memory to the new host while the guest runs, then repeatedly re-sends only the pages dirtied since the last round, and finally pauses the guest to send the remainder and CPU state; the source keeps a consistent copy until the target confirms. A snapshot serializes the same state to files: Firecracker writes a guest memory file and a microVM state file covering KVM and emulated device state, and leaves disks to the user. Restoring a snapshot in a new process resumes the guest where it was, without booting.
Overcommit means the memory configured for all VMs exceeds the machine’s real memory. VMware ESX Server’s 2002 paper introduced two techniques for it. A balloon driver inside the guest allocates and pins pages on the hypervisor’s request, so the guest’s own memory manager decides what to give up. Content-based page sharing merges identical pages across VMs; in one experiment with identical Linux VMs, sharing reclaimed nearly 60% of all VM memory. Linux has the same idea as KSM (Kernel Samepage Merging), originally written for KVM: a daemon scans registered memory and replaces identical pages with one write-protected copy.
Nested virtualization runs a hypervisor inside a VM. Google describes it as levels: the physical host and its hypervisor are L0, the VMs on it L1, and VMs inside an L1 hypervisor L2. Each cloud limits it: Compute Engine supports only KVM at L1, and EC2 offers it on C8i, M8i and R8i instances. Every extra level adds address translations, which KVM has to fold into hardware that supports at most two.
Security: escapes and side channels#
The hypervisor is the wall between tenants, and its biggest attack surface is the device models. In 2015 the VENOM bug (CVE-2015-3456) let a guest user write out of bounds in QEMU’s emulated floppy disk controller, used by Xen and KVM, and possibly run code on the host. That is why newer VMMs emulate very few devices, why Firecracker and Cloud Hypervisor are written in Rust, a memory-safe language, and why AWS’s Nitro Hypervisor leaves out general-purpose operating system components and moves networking and storage to separate Nitro cards.
CPU side channels cross the wall without a bug in the hypervisor. With L1 Terminal Fault (L1TF), a malicious guest on one hyperthread could read data that the sibling hyperthread (the host, or another guest) had brought into the shared L1 cache. The mitigations are costly: flushing the L1 cache on VM entry (the Linux docs report slowdowns from 1% to 50% depending on the workload), pinning each guest to whole cores so tenants never share siblings, or turning SMT off.
See it in a real stack
Architectures that use hypervisors
In code · bash
# Run in a Debian 12 container on an Arm Mac: no /dev/kvm, so no hardware acceleration
apt-get install -y qemu-system-x86 qemu-system-arm
# Which accelerators can each QEMU binary use?
qemu-system-aarch64 -accel help
# Accelerators supported in QEMU binary:
# kvm
# tcg
qemu-system-x86_64 -accel help # an x86 guest on an Arm host can only be emulated
# Accelerators supported in QEMU binary:
# tcg
# KVM needs the kernel’s /dev/kvm device, which this container doesn’t have
qemu-system-aarch64 -M virt -accel kvm -nographic
# Could not access KVM kernel module: No such file or directory
# qemu-system-aarch64: -accel kvm: failed to initialize kvm: No such file or directory
# So boot an x86 Linux guest (Alpine’s netboot kernel) with TCG, QEMU’s software CPU
qemu-system-x86_64 -accel tcg -m 512 -nographic -no-reboot \
-kernel vmlinuz-virt -initrd initramfs-virt -append "console=ttyS0 panic=-1"
# [ 0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
# [ 0.072501] Booting paravirtualized kernel on bare hardware
# [ 3.005845] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection
# The guest sees an emulated 1996 chipset and an emulated Intel network card.
# Under KVM, the same kernel line reads “on KVM” instead of “on bare hardware”.
# Add -nic user,model=virtio-net-pci and the card becomes a paravirtual virtio device
# (the virtio spec: PCI vendor 0x1af4 with a device ID from 0x1000 to 0x107f is a virtio device):
# [ 0.953372] pci 0000:00:03.0: [1af4:1000] type 00 class 0x020000 conventional PCI endpoint
# On a Linux host, check for hardware support, then swap -accel tcg for -accel kvm
grep -cE 'vmx|svm' /proc/cpuinfo # x86: more than 0 means VT-x or AMD-V
ls -l /dev/kvmOften confused with
Where it came from1967–2017
The hypervisor began as a way to share one expensive mainframe. At IBM’s Cambridge Scientific Center, CP-40 went into production in January 1967 on a specially modified System/360 Model 40, giving each user a virtual machine, and was then rewritten as CP-67 for the Model 67. In a February 1973 Harvard thesis, Robert Goldberg named the two ways to build such a monitor: Type I runs on a bare machine, Type II under a host operating system. A year later Popek and Goldberg defined a monitor by three properties (an essentially identical machine, at worst minor slowdowns, complete control of resources) and proved when trap-and-emulate works.
The x86 PC failed their test, so the first PC hypervisors relied on software tricks. VMware Workstation (1999) was a hosted, type 2 design that combined direct execution with dynamic binary translation of kernel code. Xen (2003), from the University of Cambridge, asked guests to be ported to an idealized interface, targeting up to 100 VMs on one server. Intel shipped its first processors with Virtualization Technology in November 2005, and AMD introduced a similar design. Surprisingly, VMware’s 2006 study found the hardware-assisted monitor often slower than its software one, mainly because the CPU still didn’t virtualize the MMU; nested paging (AMD) and EPT (Intel) were the answer.
Hardware support made a small hypervisor possible. KVM, written at Qumranet, was merged into Linux 2.6.20 in February 2007: a driver exposing /dev/kvm, with each VM a Linux process and device emulation left to user space. Microsoft released Hyper-V in June 2008. In the cloud, EC2 ran on Xen from its 2006 launch, but emulating storage and network devices in software meant reserving several CPU cores per server. With C5 in November 2017, AWS introduced the Nitro Hypervisor, built on KVM, with I/O moved to dedicated cards. A year later AWS open-sourced Firecracker, a minimal KVM-based VMM for Lambda.
Why it’s built this way
- Trap only what must be trapped
- Emulating every instruction is too slow. Running guest code directly and stepping in only for privileged operations is what keeps VMs close to native speed, and it’s why the cost of each VM exit matters so much.
- Paravirtualize when the hardware can’t help
- Without hardware support, Xen made the guest call the hypervisor instead of touching hardware. The idea outlived its reason: virtio and Hyper-V’s VMBus devices are paravirtual because bypassing device emulation is more efficient than imitating real hardware.
- Reuse an operating system kernel as the hypervisor
- KVM let Linux schedule vCPUs as threads and manage guest memory as process memory, so swapping, page migration, page merging and huge pages work on VMs without new code. Hyper-V’s root partition does the same with Windows for drivers and management.
- Move device emulation off the host CPU
- As networks and disks got faster, emulating them in software took whole CPU cores. Nitro moved networking and storage onto dedicated hardware, leaving the hypervisor to isolate CPU and memory, which let AWS sell practically all of a server’s resources.
Timeline
- 1967
IBM’s CP-40 goes into production, running virtual machines on a modified System/360
- 1973
Goldberg’s Harvard thesis classifies monitors as Type I (bare machine) and Type II (hosted)
- 1999
VMware Workstation virtualizes x86 with binary translation
- 2003
Xen introduces paravirtualization on x86
- 2005
Intel ships the first processors with hardware virtualization (VT-x)
- 2007
KVM merged into Linux 2.6.20
- 2017
AWS introduces the KVM-based Nitro Hypervisor with C5 instances
- Melinda Varian: VM and the VM Community, Past, Present, and Future (1997)
- Robert P. Goldberg: Architectural Principles for Virtual Computer Systems, Harvard thesis (Feb 1973), DTIC AD0772809 · archived copy, original
- Bugnion et al.: Bringing virtualization to the x86 architecture with the original VMware Workstation (ACM TOCS, 2012)
- Barham et al.: Xen and the Art of Virtualization (SOSP 2003)
- Intel press release: Intel delivers new era for virtualization (Nov 2005)
- Adams and Agesen: A Comparison of Software and Hardware Techniques for x86 Virtualization (ASPLOS 2006)
- Kernel Newbies: Linux 2.6.20 adds KVM (Feb 2007)
- Kivity et al.: kvm, the Linux Virtual Machine Monitor (Ottawa Linux Symposium, 2007)
- Virtualization Review: Hyper-V made available (Jun 2008)
- James Hamilton: Xen-on-Nitro, AWS Nitro for legacy instances (2021)
- AWS News Blog: Now available, compute-intensive C5 instances (Nov 2017)
- Amazon EC2 FAQs: the Nitro Hypervisor is built on core KVM technology
- AWS News Blog: Firecracker, lightweight virtualization for serverless computing (Nov 2018)
- Linux kernel docs: the x86 KVM shadow MMU (integration requirements)
Sources44
- Adams and Agesen: A Comparison of Software and Hardware Techniques for x86 Virtualization (ASPLOS 2006)
- Bugnion et al.: Bringing virtualization to the x86 architecture with the original VMware Workstation (ACM TOCS, 2012)
- Barham et al.: Xen and the Art of Virtualization (SOSP 2003)
- Robert P. Goldberg: Architectural Principles for Virtual Computer Systems, Harvard thesis (Feb 1973), DTIC AD0772809 · archived copy, original
- Kivity et al.: kvm, the Linux Virtual Machine Monitor (Ottawa Linux Symposium, 2007)
- Linux kernel docs: The KVM API (/dev/kvm, KVM_RUN, exit reasons)
- Linux kernel docs: the x86 KVM shadow MMU (two-dimensional paging, nested translation)
- Linux kernel docs: Booting AArch64 Linux (EL2 for the virtualization extensions)
- Kernel Newbies: Linux 2.6.20 adds KVM (each VM a process, each vCPU a thread)
- Linux source: arch/x86/kernel/kvm.c (paravirt name “KVM”)
- OASIS: Virtual I/O Device (VIRTIO) Version 1.3 (PCI vendor ID 0x1AF4)
- Linux kernel docs: VFIO, Virtual Function I/O
- Linux kernel docs: PCI Express I/O Virtualization (SR-IOV) howto
- Microsoft Learn: Hyper-V architecture (root partition, VMBus, enlightened I/O)
- Microsoft Learn: Hypervisor security on the Azure fleet (based on Windows Hyper-V)
- Microsoft Learn: Isolation in the Azure public cloud (Hyper-V and root OS isolation)
- Amazon EC2 FAQs: Nitro Hypervisor built on KVM; nested virtualization on C8i, M8i and R8i
- Compute Engine docs: About nested virtualization (KVM-based hypervisor, L0/L1/L2)
- Compute Engine docs: Live migration process (brownout, blackout, clock jump)
- Lambda docs: Tenant isolation (execution environments use Firecracker)
- James Hamilton: Xen-on-Nitro, AWS Nitro for legacy instances (2021)
- Xen Project: the Xen hypervisor (type-1, Linux Foundation project)
- Xen source: COPYING (GPL version 2 only)
- Linux kernel docs: Linux kernel licensing rules (GPL-2.0)
- Broadcom TechDocs: Installing and setting up ESXi
- Broadcom TechDocs: VMware ESXi 8.0 Update 3e release notes (free vSphere Hypervisor 8, non-production)
- Broadcom: Broadcom completes acquisition of VMware (Nov 2023)
- QEMU docs: About QEMU (emulator and virtualizer; KVM, Xen, Hypervisor.Framework)
- QEMU docs: License (GPL version 2)
- AWS News Blog: Firecracker, lightweight virtualization for serverless computing (Nov 2018)
- Firecracker LICENSE (Apache 2.0)
- Cloud Hypervisor README: a VMM on KVM and MSHV
- Cloud Hypervisor LICENSES directory (Apache-2.0, BSD-3-Clause)
- Oracle VirtualBox manual: Introduction (a hosted, type 2 hypervisor)
- VirtualBox: Licensing FAQ (GPLv3 base, PUEL Extension Pack)
- FreeBSD Handbook: Virtualization (bhyve in the base system since 10.0)
- Apple Developer: Hypervisor framework
- Proxmox VE overview (integrates the KVM hypervisor and LXC)
- Clark et al.: Live Migration of Virtual Machines (NSDI 2005)
- Firecracker docs: Snapshot support
- Waldspurger: Memory Resource Management in VMware ESX Server (OSDI 2002)
- Linux kernel docs: Kernel Samepage Merging
- CVE-2015-3456 (VENOM): QEMU floppy disk controller
- Linux kernel docs: L1TF, L1 Terminal Fault (malicious guests, SMT, mitigations)