What are the levels of virtualization in cloud computing?
A common textbook answer lists five levels, as set out in Hwang, Fox, and Dongarra’s Distributed and Cloud Computing (2011). They are instruction set architecture (ISA), hardware abstraction layer (HAL), operating system, library (user-level API), and application (process). The levels describe where in the software stack virtualization happens. They do not describe what kind of resource is being virtualized. Other sources use different categories, so treat the five levels as one common framework.
The five levels
| Level | What it virtualizes | Examples | Notes |
|---|---|---|---|
| Instruction set architecture (ISA) | Emulates one processor instruction set on another | QEMU, Bochs, Apple Rosetta 2 | Most flexible, but the slowest |
| Hardware abstraction layer (HAL) | CPU, memory, and I/O, through a hypervisor | VMware ESXi, Xen, Hyper-V, KVM | Strong isolation with near-native performance |
| Operating system | Isolated user spaces that share one kernel | Docker, LXC, OpenVZ, FreeBSD jails, Solaris Zones | Weakest isolation, because the kernel is shared |
| Library (user-level API) | Intercepts and translates API calls | Wine, vCUDA, WABI | Translates APIs rather than emulating a whole machine |
| Application (process) | Runs a program on a high-level virtual machine | Java Virtual Machine, .NET CLR | Portable across operating systems |
How the levels trade off performance and isolation
Performance and isolation pull in different directions:
- Instruction-set emulation is the most flexible, because it can run code built for a different processor. It is also the slowest, because each instruction must be translated.
- The hardware abstraction layer and operating-system levels deliver near-native performance. The HAL gives strong isolation, because each VM has its own guest kernel. The operating-system level gives weaker isolation, because containers share the host kernel.
- The library and application levels sit higher in the stack. They help with portability, but they do not isolate a full operating system.
Exact ratings for each level vary between sources.
Levels versus types of virtualization
The two terms are easy to confuse:
- Levels describe where virtualization happens in the stack, as listed above.
- Types describe what is virtualized: servers, storage, networks, desktops, applications, or data. The types of virtualization in cloud computing article covers them.
Server virtualization usually works at the HAL level, while container-based virtualization works at the operating-system level.
Why virtualization was hard on x86
In 1974, Popek and Goldberg set out formal requirements for a virtual machine monitor, including equivalence (software behaves the same as on real hardware), resource control, and efficiency. Classic x86 processors did not meet these requirements. Robin and Irvine (2000) found about 17 sensitive instructions that could run without privilege, so a hypervisor could not reliably intercept them. Three fixes made x86 virtualization practical:
- Binary translation, used by VMware from 1999, rewrites problem instructions as the code runs.
- Paravirtualization, used by Xen from 2003, changes the guest operating system so that it calls the hypervisor directly.
- Hardware-assisted virtualization, with Intel VT-x and AMD-V from around 2005 and 2006, adds CPU support for running guest systems.
Which levels do cloud providers use?
Public infrastructure clouds mainly use the hardware abstraction layer. Each customer gets a VM with its own kernel and strong isolation. Containers and Kubernetes use the operating-system level, which is lighter but shares the host kernel. Many cloud platforms combine the two, running containers inside VMs. The containers versus virtual machines comparison covers how those choices affect isolation and startup time.
Key takeaways
- The five textbook levels are ISA, HAL, operating system, library, and application.
- The ISA level is the most flexible but the slowest. The HAL and operating-system levels run close to native speed, and the HAL gives the stronger isolation that most public cloud VMs rely on.
- Levels describe where virtualization happens. Types describe what is virtualized.
- For the VM families cloud providers sell, see how many types of VMs there are.