Chapters 6
Virtualization
Virtualization is a software method of running virtual machines (computers) with a hypervisor program.
6.1. Virtualization and emulation
Emulation is a process in which a computer completely imitates the hardware architecture and operational logic of another computer or hardware components. Unlike virtualization, emulation is used when the underlying architectures are incompatible. An emulator continuously translates processor instructions in software and recreates device components, allowing software to run on hardware for which it was not originally designed.
A virtual machine is a computer-like system that runs as a software process. A virtual machine’s hardware components are partly emulated in software and partly use the physical computer’s capabilities directly because they share an architecture.
A hypervisor is virtualization software that enables a physical system to run virtual machines. It allocates the physical computer’s resources — computing power, RAM, and persistent storage — among virtual machines and controls their state.
6.2. Types of hypervisors
Type 2 (hosted hypervisors)
These run as ordinary applications on top of a conventional operating system. They are convenient for development, testing, and everyday use on personal computers.
- VirtualBox: Linux / Windows / macOS;
- GNOME Boxes: Linux;
- QEMU: Linux / Windows / macOS;
- UTM: macOS.
Type 1 (hypervisor operating systems, or bare metal)
These are installed as a complete operating system directly on the computer’s persistent storage, without a conventional operating system beneath them. They provide substantially higher performance and security because they work directly with hardware components.
- Proxmox: Linux / KVM / QEMU;
- Xen / XCP-ng: Xen / dom0;
- Qubes OS: Xen / dom0;
- Hyper-V: Windows (architecturally operates at the component layer beneath Windows itself).
6.3. Usage example
Using a hypervisor, a virtual machine is created with the following allocated components: 2 CPU cores, 4 GB of RAM, 30 GB of persistent storage, and an operating-system installation image. After it starts, the virtual system is installed, configured, and used as if it were running on separate, real hardware components.
6.4. Alternative: containerization
In addition to full virtual machines, there is a more lightweight approach: containers (for example, Docker). Instead of creating a separate virtual machine and installing a separate guest OS, containers use the host operating system’s shared kernel. They isolate only the files, libraries, and processes required for a particular application. This substantially saves computer resources and speeds up application startup.