Virtualization & Containers

type-1 versus type-2 hypervisors

Hypervisors come in two flavours, and the difference is simply: what sits directly on the bare hardware? A type-1 (bare-metal) hypervisor IS the thing on the hardware - it boots first, owns the machine, and the guest operating systems run on top of it. A type-2 (hosted) hypervisor is just a program running inside an ordinary operating system - you boot Windows or macOS or Linux normally, then launch the hypervisor like any other app, and IT in turn runs the guests. One replaces the operating system at the bottom; the other rides on top of one.

Type-1 examples are Xen, VMware ESXi, and Microsoft Hyper-V; these are what data centres and cloud providers use because they are lean, fast, and have a tiny trusted base with no general-purpose operating system underneath to slow things down or widen the attack surface. Type-2 examples are VirtualBox and VMware Workstation, which a developer runs on a desktop to spin up a test VM in a window. Linux KVM is the famous in-between case: it is a kernel module that turns the running Linux kernel itself into a type-1-style hypervisor, so people argue about which type it is. The honest answer is that the textbook two-bucket split is a useful simplification, and KVM shows the buckets leak: because the Linux kernel boots on bare metal and then hosts guests directly through hardware support, KVM behaves like type-1 even though a full Linux runs alongside.

Why the distinction matters in practice: type-1 generally wins on raw performance and on the smallness of the trusted code (fewer lines underneath your guests means fewer bugs that could break isolation), which is why it dominates server and cloud deployments. Type-2 wins on convenience - you keep your normal desktop and just run a VM when you need one - at the cost of an extra software layer (the host OS) sitting between the guest and the hardware.

ESXi boots straight off the server's disk with no Windows or Linux underneath - that is type-1. VirtualBox is double-clicked inside an already-running Windows desktop to open a Linux VM in a window - that is type-2.

Type-1 boots on the bare hardware; type-2 runs as an app inside a host OS.

The clean type-1/type-2 split is a simplification: KVM blurs it by turning a normal Linux kernel into a bare-metal-style hypervisor. Judge by what actually owns the hardware first, not by the marketing label.

Also called
bare-metal vs hosted hypervisornative hypervisor裸機型與托管型超管理器