Virtualization

VM and container boundaries

Compare a VM with its own guest OS and kernel against containers that isolate processes while sharing the host kernel.

VM includes a guest OS and kernelContainers share the host kernelvm-hardware ↔ vm-hypervisorvm-hypervisor ↔ vm-guestvm-guest ↔ vm-appcontainer-hardware ↔ container-kernelcontainer-kernel ↔ container-runtimecontainer-runtime ↔ container-acontainer-runtime ↔ container-bPhysical hardwarePhysical hardwareHypervisorHypervisorVM · guest OS + kernelVM · guest OS + kernelApplicationApplicationPhysical hardwarePhysical hardwareHost OS kernelHost OS kernelContainer runtimeContainer runtimeContainer AContainer AContainer BContainer B
Legend

Current step

A VM virtualizes hardware

The hypervisor presents virtual devices and each VM runs its own guest OS and kernel.

Both approaches provide useful isolation, but at different layers and with different trade-offs. Containers can also run inside VMs, combining application packaging with a VM boundary.

Documentation example: addresses use the RFC 5737 ranges and ASNs use the reserved private range. Nothing here connects to a real network.

Tags

  • virtualization
  • vm
  • container
  • kernel
  • isolation
  • comparison

Lessons using this diagram