Virtual machine (VM)

A software-defined computer with its own operating system and kernel, run as a guest by a hypervisor that shares one physical host's hardware among several such guests.

A virtual machine (VM) is a complete computer environment implemented in software: virtual processors, memory, disks and network interfaces on which a full guest operating system, with its own kernel, runs as though it had the hardware to itself. A hypervisor creates the VMs, shares the host’s physical resources among them and keeps them apart. A type 1 hypervisor runs directly on the hardware; a type 2 hypervisor runs on a host operating system. A VM is stored as files, which is what makes it easy to copy, snapshot, move and restore.

The distinction candidates commonly confuse is with a container. Each VM has its own kernel, while containerization runs isolated processes that share the host’s kernel, so a kernel flaw reachable from inside one container can affect its neighbours. For VMs the isolation boundary is the hypervisor, which makes it a critical part of the trusted computing base of the virtual estate. Two risks follow: virtual machine escape, where that boundary fails, and virtual machine sprawl, where easy copying produces guests faster than they are governed.

Exam relevance: scenarios in this area tend to turn on where the isolation boundary sits. Separate kernels point to virtual machines and the hypervisor; a shared kernel points to containers.