CCNA explainer C01: Hypervisors, VMs and containers
Every lab in this series runs on virtualization, so exam topic 1.2 is one you already use. This post covers what the exam asks: the role of hypervisors, virtual machines and containers, and how they differ.
Hypervisors
A hypervisor lets one physical server run several operating systems at once. It shares out the server’s CPU, memory, storage and network between them and keeps each one isolated from the others.
| Type 1 (bare metal) | Type 2 (hosted) | |
|---|---|---|
| Runs on | The hardware directly | An ordinary operating system (Windows, macOS, Linux) |
| Examples | VMware ESXi, Proxmox VE (KVM), Microsoft Hyper-V | VMware Workstation, VirtualBox, Parallels |
| Typical use | Data centers and servers | Desktops and laptops |
| Overhead | Lower: nothing sits between it and the hardware | Higher: the host OS is in the way |
The servers behind this lab series are type 1: Proxmox VE hosts running KVM. VMware Workstation on a laptop is the type 2 equivalent.
Virtual machines
A virtual machine (VM) is a complete computer in software. It has virtual CPUs, memory, disks and network cards, and runs its own full operating system with its own kernel. Because each VM carries a whole OS, VMs are strongly isolated but heavy: gigabytes of disk and memory, and boot times measured in seconds or minutes.
In this series, the GNS3 server is a VM on a Proxmox host. Inside it, every IOSv router and IOSvL2 switch is itself a small VM, run by QEMU. That makes the routers VMs inside a VM, which is called nested virtualization. It only performs well when the host passes its hardware virtualization support (Intel VT-x or AMD-V) through to the GNS3 VM.
Containers
A container packages an application and its libraries, but shares the host’s operating system kernel instead of bringing its own. Docker is the best-known container engine.
| Virtual machine | Container | |
|---|---|---|
| Includes | A full OS and its own kernel | The application and its libraries only |
| Size | Gigabytes | Megabytes |
| Starts in | Seconds to minutes | Under a second |
| Isolation | Strong (separate kernels) | Lighter (one shared kernel) |
| Can run a different OS from the host | Yes | No: a Linux container needs a Linux kernel |
GNS3 can run Docker containers as lab nodes, and Containerlab builds whole topologies out of container-based network operating systems such as Arista cEOS and Nokia SR Linux. That is why a large container lab can fit on a machine that would struggle with the same number of VMs.
What to remember for the exam
- A hypervisor shares hardware between isolated guests. Type 1 runs on bare metal; type 2 runs on top of an operating system.
- A VM has its own operating system and kernel. A container shares the host’s kernel.
- Containers are smaller and start faster. VMs isolate more strongly and can run any OS.
- A virtual switch inside the hypervisor connects VMs to each other and to the physical network, often with VLAN tags, just as a physical access switch does for servers.