Overview

Computers are powerful, but they are usually bored. A server might only use 10% of its CPU. Virtualization allows you to slice one physical computer into ten “Virtual Machines” (VMs). Each VM thinks it has the whole computer to itself. It is the magic trick that makes Cloud Computing possible.

Core Idea

The core idea is The Hypervisor. A layer of software that sits between the hardware and the operating system. It acts like a traffic cop, sharing the CPU and RAM fairly between the VMs.

Formal Definition

The creation of a virtual version of something, such as an operating system, a server, a storage device, or network resources.

Intuition

  • Physical Server: A large house with one person living in it. (Wasteful).
  • Virtualization: Turning that house into an apartment building. Now 10 families live there. They share the plumbing and electricity, but they have their own locked doors.

Examples

  • VMware: The company that pioneered virtualization on x86 chips.
  • Emulators: Playing a Nintendo game on your PC. The PC is “pretending” to be a Game Boy (virtualizing the hardware).
  • Docker (Containers): A lighter version of virtualization. Instead of virtualizing the whole hardware, you just virtualize the Operating System. It starts in milliseconds instead of minutes.

Common Misconceptions

  • It’s slow: Modern CPUs have hardware support for virtualization (Intel VT-x). The performance penalty is almost zero.
  • Sandbox: A safe place to run dangerous code. If a virus infects the VM, you just delete the VM. The physical computer is safe.
  • Snapshot: Freezing a VM in time. If you break something, you can rewind to the snapshot instantly.

Applications

  • Legacy Software: Running Windows 95 inside a VM on Windows 11 to play old games or run old bank software.

Criticism / Limitations

  • Noisy Neighbor: If one VM goes crazy and uses 100% of the disk, the other VMs on the same server slow down.

Further Reading

  • Smith, James and Nair, Ravi. Virtual Machines.