A hypervisor is software whose entire job is convincing other software that it has a computer to itself.Buy a server and you get one machine. Install a hypervisor on it, and you get as many machines as its memory allows. Each one has its own operating system, its own network address, and its own reboot button. They cannot see each other’s files. One crashing does not disturb the others. This is not a trick of naming. The isolation is enforced by the processor itself, which has instructions designed for exactly this.
Why bother
Because software is territorial. Two applications that each want to own port 443, or each want a different version of the same library, fight forever on one operating system. They coexist happily on two. The alternative, one physical machine per app, wastes almost everything. A typical service uses a few percent of a modern CPU. Running twenty of them on twenty machines means twenty power supplies, twenty sets of fans, and nineteen machines’ worth of idle capacity.Two kinds of guest
The slices are called guests, and they come in two flavours that are easy to confuse.
Most guests here are containers, because most of what runs is Linux software on a Linux host. The
overhead of a full virtual machine buys nothing. Virtual machines are used where something genuinely
needs its own kernel, or where a vendor supports nothing else.
What the hypervisor actually owns
Three things, and knowing which layer owns what saves hours of misdirected debugging:1
Carving up hardware
How much memory and how many CPU cores each guest may use. Overcommitting is allowed. Guests can
be promised more memory in total than physically exists, on the bet that they won’t all want it
at once. That bet occasionally loses.
2
Storage
Each guest gets a virtual disk. The hypervisor decides where that really lives: local drives, a shared array, or a filesystem that can snapshot it instantly.
3
Networking
A virtual switch inside the host. Guests plug into it and get addresses as though they were
physical machines on a real network. That’s why a guest can sit on a different network segment
from its own host.
Where to go next
Clusters and quorum
What happens when you join several of these hosts together.
Containers vs virtual machines
The technical version of the comparison above.