Skip to the workspace
Pebellslearn by building
Introduction  ›  Lesson

Bare Metal, VMs and Containers

Bare Metal vs VMs vs Containers 14 minBare metal runs one operating system on the hardware, virtual machines each bring their own kernel on shared hardware, and containers share the host's kernel, trading some isolation for speed and density.

docker / Bare Metal, VMs and Containers

Explore each scene at your own pace.

01 · The rule

The rule

Bare Metal, VMs and Containers

Your team has one powerful server and wants to run twenty copies of quicknotes on it, one per customer. You could give each customer a machine, a virtual machine, or a container. The choice decides how much memory you waste, how fast things start, and how strongly customers are separated.

The rule

Bare metal shares nothing, VMs share hardware, containers share the kernel.

  • Bare metal. One operating system installed straight on a physical machine. Apps run on it directly. Nothing is shared with other machines, but one machine per workload wastes capacity.
  • Virtual machine (VM). A hypervisor slices one physical machine into several pretend machines. Each VM boots its own complete operating system, kernel included. Strong separation, but each copy costs gigabytes of disk and memory and a boot that often takes tens of seconds.
  • Container. Processes on one host that all use the host's single kernel, each with its own private view. Megabytes instead of gigabytes, start-up in about a second, but the separation is only as strong as that shared kernel.
Bare metal VM Container
Kernels one per machine one per VM, plus the host one, shared
Typical size whole machine gigabytes megabytes
Start-up minutes to boot tens of seconds about a second
Isolation physical strong good, thinner

These layers also stack. Cloud servers are usually VMs, and you run containers inside them. On a Mac or Windows laptop, Docker quietly runs one small Linux VM and puts all your Linux containers inside it.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.