# Hypervisor

> The software layer that splits one physical computer into many virtual machines.

- Level: Advanced
- Topics: Cloud
- URL: https://tidbit.legios.com.ar/hypervisor/
- In Spanish: [Hipervisor](https://tidbit.legios.com.ar/es/hypervisor/)

A **hypervisor** is the software that creates and runs virtual machines. It sits between the physical hardware and the VMs, hands each one a share of CPU time, memory, storage and network, and keeps them isolated: a VM thinks it has a whole computer to itself, and it cannot read another VM's memory. This whole technique is called **virtualization**.

There are two broad kinds. A **type 1** or bare-metal hypervisor runs directly on the hardware, with no ordinary operating system underneath; this is what data centers use, with examples like VMware ESXi, Microsoft Hyper-V, Xen and KVM, which is built into Linux. A **type 2** hypervisor runs as an app on your normal operating system, like VirtualBox or Parallels on a laptop; it is convenient for testing but adds a layer of overhead.

Modern CPUs include special instructions that let hypervisors run VMs at close to native speed. Cloud providers build their own on top of these: AWS uses the **Nitro** system, which moves much of the virtualization work onto dedicated hardware cards, and **Firecracker**, a tiny hypervisor that starts lightweight VMs in a fraction of a second for AWS Lambda and Fargate. Because the hypervisor is the wall between customers, its security is critical.

## An analogy

The manager of a shared office building who assigns each tenant their own floor, meters their electricity and makes sure nobody's key opens someone else's door. The tenants only see their own floor; the manager sees the whole building.

## Keep in mind

- Creates virtual machines and shares out CPU, memory, disk and network among them.
- Type 1 runs on bare hardware (ESXi, Hyper-V, KVM); type 2 runs on top of an OS (VirtualBox).
- CPU support for virtualization makes VMs run at near-native speed.
- The hypervisor is the isolation boundary between cloud customers.

## Go deeper

- [What is a hypervisor? (AWS)](https://aws.amazon.com/what-is/hypervisor/)
- [Hypervisor on Wikipedia](https://en.wikipedia.org/wiki/Hypervisor)

## Related terms

- [Virtual machine](https://tidbit.legios.com.ar/virtual-machine/): A complete computer made of software, running inside a real one.
- [CPU](https://tidbit.legios.com.ar/cpu/): The chip that runs your programs, one instruction after another, very fast.
- [Operating system](https://tidbit.legios.com.ar/operating-system/): The base software that runs a device and lets every app share its hardware.
- [Data center](https://tidbit.legios.com.ar/data-center/): A building full of servers where the internet, the cloud and AI actually run.
- [Microsoft](https://tidbit.legios.com.ar/microsoft/): The company of Windows and Office, now just as much a cloud company with Azure.
- [Linux](https://tidbit.legios.com.ar/linux/): A free, open source operating system that runs most of the internet's servers.
- [Cloud computing](https://tidbit.legios.com.ar/cloud-computing/): Renting computers over the internet instead of buying your own.
- [AWS Lambda](https://tidbit.legios.com.ar/aws-lambda/): Run a piece of code only when something happens, with no server to manage.
