Six Types of Virtualisation
Virtualisation encompasses a broad spectrum of techniques, each optimised for different use cases. Understanding the distinctions helps in selecting the right approach for a given workload.
1. Hardware Virtualisation (Full Virtualisation)
The hypervisor simulates complete hardware, allowing unmodified guest operating systems to run. The guest OS is unaware it is virtualised.
Examples: QEMU, VMware Workstation, VirtualBox, Parallels.
Characteristics:
- Full hardware emulation.
- Unmodified guest OS required.
- Higher overhead than paravirtualisation.
- Suitable for running diverse operating systems.
2. Paravirtualisation
The guest OS is aware of the hypervisor and makes hypercalls for privileged operations. This reduces emulation overhead.
Examples: Xen PV, KVM with virtio drivers.
Characteristics:
- Modified guest OS kernel with hypercall support.
- Near-native performance for I/O operations.
- Requires guest OS modifications.
- Historically important; less common today with hardware-assisted virtualisation.
3. Hardware-Assisted Virtualisation
Modern CPUs include extensions (Intel VT-x, AMD-V) that provide hardware support for virtualisation. The hypervisor uses these extensions to run guest OSes with minimal overhead.
Examples: KVM, Hyper-V, Xen HVM.
Characteristics:
- Near-native performance.
- Unmodified guest OS support.
- Hardware extensions handle privileged operations.
- The dominant approach for server and desktop virtualisation.
4. Operating System-Level Virtualisation (Containers)
The kernel creates isolated environments (containers) that share the host kernel. Each container has its own filesystem, processes, network, and user namespaces.
Examples: LXC, LXD, Docker, Podman.
Characteristics:
- Lightweight: no separate kernel, minimal overhead.
- Fast startup: milliseconds.
- Shares the host kernel.
- Limited to OSes compatible with the host kernel.
See Article - Lightweight OS virtualisation techniques (chroot, namespace) for namespace details and Article - Containerized systems (dockerhub images) for container packaging.
5. Application Virtualisation
Individual applications are packaged with their dependencies in isolated environments. The application does not need system-wide installation.
Examples: Snap, Flatpak, AppImage.
Characteristics:
- Application-level isolation.
- Bundles dependencies.
- Sandboxed execution.
- Suitable for desktop applications.
See Article - Application container systems (snap, flatpak) for snap and flatpak.
6. Emulation
Emulation replicates the complete hardware architecture of a different system in software. It is the slowest but most flexible form of virtualisation.
Examples: QEMU (without KVM), Bochs, PearPC.
Characteristics:
- Complete hardware emulation (CPU, memory, devices).
- Can run OSes compiled for different architectures (e.g., ARM on x86).
- High overhead due to full emulation.
- Useful for embedded development and legacy system support.
Comparison Table
| Type | Overhead | Guest OS | Use Case |
|---|---|---|---|
| Full Virtualisation | Medium | Any | Diverse OS testing |
| Paravirtualisation | Low | Modified | Legacy Xen |
| Hardware-Assisted | Very Low | Any | Production VMs |
| OS-Level (Containers) | Minimal | Same kernel | Microservices, PaaS |
| Application | Minimal | Host OS | Desktop apps |
| Emulation | Very High | Any architecture | Embedded, legacy |