What is virtualization?
Virtualization splits one real computer into several machines made of software. Learn how a hypervisor does it, why data centres depend on it, and where it costs you.
Virtualization means using software to split one physical computer into several separate machines. A program called a hypervisor shares out the processor, memory, disk and network, and gives each virtual machine its own operating system. Each one runs as though it owns the hardware. This packs many jobs onto one server and keeps them apart.
Picture a big house on a plot in town. One family lives in it, and most of the rooms sit empty most of the day. So the owner splits the house into six flats. Each flat gets its own door, its own lock and its own meter. Six families now live where one lived before, and no tenant can walk into another flat.
Virtualization does that to a computer, and one real machine is cut into several machines made of software. Each one runs its own operating system, keeps its own disk, and answers to its own name on the network. Each one behaves as though it owns the whole machine.
The software that does the cutting is called a hypervisor, and it is the landlord. It hands out the rooms, holds the keys, and makes sure one tenant cannot see into the flat next door.
The problem virtualization solves
A computer that does one job is idle most of the time. It waits for a request, works for a moment, then waits again. Buying a separate machine for every job wastes money, space, power and cooling. In a data centre you pay for all four.
Why not put every job on one machine and share one operating system? Because the jobs fight. One crash takes them all down. One program wants an old version of a shared part, and the next program wants a new one. A break-in on one job can spread to the rest.
Virtualization settles the argument. Each job gets a whole computer of its own, and you never buy another computer. ONE MACHINE PRETENDS TO BE MANY.
How it works, step by step
Two words come first. The real machine is the host, and each software machine living on it is a guest. Hold on to those two words and the rest is easy.
- The host has real parts. A processor, memory, a disk, a network card.
- The hypervisor takes charge of those parts.
- You ask for a guest of a certain size, such as two processor cores, four gigabytes of memory and fifty gigabytes of disk.
- The hypervisor builds a matching set of pretend parts and shows them to the guest.
- You install an operating system inside the guest, and it sees what looks like a plain computer.
- When the guest needs the processor, the hypervisor gives it a turn on the real chip.
Most of the work runs straight on the real processor at full speed. Processors have carried built-in help for this for many years, so the tax is small. The hypervisor only steps in for the tricky parts, such as talking to a disk or a network card.
The disk of a guest is usually one big file on the host, and that single fact explains a lot of what follows. Therefore, a whole computer that lives in a file can be copied, mailed, backed up and moved.
The two kinds of hypervisor
The first kind sits straight on the bare hardware, with no ordinary operating system underneath. This is what data centres and cloud companies run. It is fast and it is plain, because it does one job.
The second kind runs as a program inside the operating system you already use. You install it on a laptop like any other application. However, it is slower, and it is far easier to start with. Students and developers use it every day.
What it is good at
Packing is the first strength. Ten quiet jobs can share one strong machine, so you buy one machine instead of ten.
Keeping tenants apart is the second. A guest that crashes takes only itself down, and a guest that is broken into is still inside a locked flat.
Snapshots are the third, and they are the reason many people fall in love with this. A snapshot freezes the whole guest, disk and memory together. You then try something risky, such as a big upgrade. If it goes wrong you roll back to the snapshot in seconds. Try that on a real machine.
Movement is the fourth, and a running guest can be lifted to another host while it keeps serving users. Engineers then repair or replace the first host in peace.
Old software is the fifth. A program that only runs on a system from years ago can live on inside a guest, long after that system left every shop.
What it is bad at
Every guest carries a full operating system, and every one of those must be patched, watched and backed up. Therefore, ten guests can mean ten systems to mind. The machine count went down, and the housekeeping did not.
There is also a small tax on speed. The hypervisor takes a slice of the processor and the memory for itself. For most work the loss is too small to feel, and for heavy disk or network work it can show.
Then there is the noisy neighbour, because guests share one disk and one network card. A greedy guest can slow the quiet ones, so good platforms let you cap what each guest may take.
Finally, some jobs want the real hardware. Work with tight timing, or code that needs a graphics card, needs extra setup before it runs well inside a guest.
Virtual machines and containers
People mix these two up daily. A virtual machine is a whole pretend computer with its own operating system inside. However, a container is a packed parcel. It holds one application and the few parts it needs, and it borrows the operating system of the machine underneath.
| Question | Virtual machine | Container |
|---|---|---|
| What is inside? | A full operating system | One application and its parts |
| How big is it? | Large | Small |
| How fast does it start? | Slow, like a real computer | Fast, like a program |
| How separate are tenants? | Strong walls | Thinner walls |
| What is it best for? | Different systems on one machine | Many copies of one application |
In practice most companies run both, and containers usually sit inside virtual machines, which sit on real machines.
Where you already meet it
You meet virtualization whenever you rent a server by the hour. That server is a guest on a machine you will never see, and it is the base that cloud computing is built on. The same trick, cut even finer, is what lets serverless computing run your code in a sealed box. The box is wiped a moment later.
You also meet it closer to home. Think of a test lab where every student gets a clean machine. Think of an office where the desktops live on a server, and the screens are only windows onto them. Think of a phone app tested on a pretend phone inside a laptop. All of that is the same idea.
What to check, and what to try
Check one thing on your next cloud bill. List the guests you are paying for and mark the ones nobody has logged into this month. Idle guests are the most common waste in any cloud account, because making a new one is easy and remembering it is hard.
Then try it yourself, because an hour of practice beats a week of reading. Install a free hypervisor on your laptop. Build one guest and put a free operating system inside it. Take a snapshot. Break something on purpose, then roll back to the snapshot. Once you have watched a broken computer heal in ten seconds, you will understand why data centres were rebuilt around this idea.
Just Out Tech explains new research in plain language. This article was drafted with AI assistance and checked by a human against the original source.
- Virtualization lets one physical server carry many separate machines, each with its own operating system and its own name on the network.
- The hypervisor is the program that shares real hardware among virtual machines and keeps one guest from reaching another.
- Virtualization saves hardware, but every virtual machine still needs patching, watching and backing up, so the housekeeping does not shrink.
Questions people ask
What is a hypervisor?
A hypervisor is the software that creates and runs virtual machines. It takes charge of the real processor, memory, disk and network card, then hands each virtual machine a pretend set of those parts. One kind sits straight on bare hardware and is used in data centres. Another kind runs as an ordinary program on a laptop.
What is the difference between a virtual machine and a container?
A virtual machine holds a complete operating system, so it is large and starts slowly, and the walls around it are strong. A container holds only one application and the parts it needs, and it borrows the operating system of the machine underneath. Containers start in a moment and pack tighter. Many companies run containers inside virtual machines.
Does virtualization make a computer slower?
A little. The hypervisor keeps a slice of the processor and memory for itself, and it steps in when a guest talks to a disk or a network card. Processors have carried built-in help for virtualization for many years, so most code runs at close to full speed. Work with very tight timing is the main exception.
Is virtualization the same as cloud computing?
No. Virtualization is the technique that cuts one computer into many. Cloud computing is the business of renting those pieces by the hour, over the internet, with self service and automatic billing. Nearly every cloud is built on virtualization, and you can virtualize your own machines with no cloud involved.