1. Library
  2. Servers and Infrastructure
  3. Virtualization and Containers

Updated 10 hours ago

A hypervisor, also called a virtual machine monitor (VMM), is software that creates and runs virtual machines. It sits between physical hardware and virtual machines, managing resources and ensuring isolation. It's the foundation that makes virtualization possible.

The Art of Deception

The hypervisor's job is to lie—convincingly, consistently, and to everyone at once.

From a VM's perspective, it sees CPU cores, memory, storage, and network interfaces that appear to be dedicated physical resources. The hypervisor creates this illusion while actually sharing one set of physical hardware among many VMs. Each VM believes it owns the machine. None of them do.

This deception requires constant work. The hypervisor decides which VM gets to use the physical CPU at any moment, ensures each VM's memory is isolated from the others, routes network packets to the right VM, and makes sure no VM can peek at another VM's resources.

How the Illusion Works

CPU virtualization: The hypervisor schedules CPU time across VMs, rapidly switching between them so each gets time on the physical processors. Modern processors include virtualization extensions (Intel VT-x, AMD-V) that make this sleight-of-hand efficient.

Memory management: Each VM thinks it has a contiguous block of memory starting at address zero. The hypervisor maintains mappings between what VMs think is "physical" memory and actual physical RAM. This translation happens on every memory access—billions of times per second.

I/O virtualization: The hypervisor provides virtual storage controllers, network interfaces, and other devices. When a VM writes to its "disk," the hypervisor intercepts that operation and routes it to the appropriate physical device.

Isolation enforcement: Perhaps most important, the hypervisor ensures VMs remain strangers to each other. One VM can't read another's memory, starve others of CPU time, or interfere with their operation. Without this isolation, the whole illusion collapses.

Two Types of Hypervisors

Type 1 (bare-metal) hypervisors run directly on hardware with no operating system underneath. VMware ESXi, Microsoft Hyper-V, and Xen are examples. They're faster because there's no host OS layer to go through.

Type 2 (hosted) hypervisors run as applications on top of a host operating system. VMware Workstation, VirtualBox, and Parallels are examples. They're convenient for desktop use but add overhead since VM operations must pass through the host OS.

The distinction has blurred somewhat—KVM turns the Linux kernel itself into a Type 1 hypervisor, occupying a middle ground.

Security: When the Lies Must Hold

Hypervisors are critical security boundaries. The isolation they provide isn't just about resource management—it's about trust.

Isolation prevents VMs from interfering with each other. A compromised VM shouldn't affect neighboring VMs on the same host.

Minimal attack surface is essential. If an attacker compromises the hypervisor, they potentially control every VM on that host. Hypervisors must be small and auditable.

VM escape attacks—where malicious code breaks out of a VM to attack the hypervisor or other VMs—are the nightmare scenario. This is why hypervisor security updates are critical and must be applied promptly.

Commercial and Open-Source Options

VMware ESXi dominates enterprise virtualization. It's mature, feature-rich, and has a comprehensive ecosystem of management tools.

Microsoft Hyper-V is built into Windows Server. It integrates well with Microsoft infrastructure and is popular in Windows-centric environments.

KVM (Kernel-based Virtual Machine) is built into the Linux kernel, turning Linux into a Type 1 hypervisor. It powers many cloud providers and is the foundation of much of the Internet's infrastructure.

Xen is the open-source hypervisor that powers Amazon Web Services. It pioneered many virtualization concepts that are now standard.

Performance: The Cost of Lying

Every layer of abstraction has a cost. Hypervisor overhead—the performance penalty for running virtualized instead of on bare metal—has decreased dramatically over the years.

Modern hypervisors impose only 5-10% overhead for most workloads, sometimes less. Hardware assistance from processors (Intel VT-x, AMD-V), memory management extensions (EPT, NPT), and I/O technologies (SR-IOV) have made virtualization nearly transparent.

Paravirtualization—where the guest OS knows it's being lied to and cooperates with the hypervisor—can reduce overhead further. But hardware assistance has made this optimization less necessary than it once was.

Nested Virtualization: Lies Within Lies

Some scenarios require running hypervisors inside VMs—nested virtualization. A hypervisor lies to a VM, which runs a hypervisor that lies to its own VMs.

This is useful for testing, labs, and development environments. The performance overhead is significant, but modern hypervisors increasingly support it.

Takeaways

  • A hypervisor creates virtual machines by presenting fake hardware to each VM while secretly sharing one physical host among many—the art of convincing deception.
  • Core functions include CPU scheduling, memory isolation, I/O virtualization, and strict isolation to prevent VMs from detecting or interfering with each other.
  • Type 1 (bare-metal) hypervisors run directly on hardware for better performance; Type 2 (hosted) hypervisors run atop a host OS for convenience.
  • Security is existential—if the hypervisor is compromised, every VM on that host is compromised. VM escape attacks are the nightmare scenario.
  • Major options include VMware ESXi (enterprise leader), Microsoft Hyper-V (Windows environments), KVM (Linux/cloud), and Xen (AWS foundation).
  • Modern hypervisors impose only 5-10% overhead thanks to hardware assistance from Intel VT-x, AMD-V, and I/O virtualization technologies.
  • Nested virtualization—running hypervisors inside VMs—enables testing and development scenarios, though with significant performance cost.

Frequently Asked Questions About Hypervisors

Was this page helpful?

😔
🤨
😃
What Is a Hypervisor? • Library • Connected