Virtualization is the technique of running several isolated computers on one physical machine. A thin software layer, the hypervisor, shares out the real CPU, memory, disk and network so each guest believes it has its own hardware. Virtualization is what makes VPS hosting, cloud servers and most modern data centres possible.
Before you start
- No technical setup is needed; this guide explains concepts.
- Basic familiarity with what a server and an operating system are helps.
How virtualization works
A physical server (the host) runs a hypervisor. The hypervisor creates virtual machines (VMs, also called guests), each with virtual CPUs, a slice of RAM, a virtual disk and a virtual network card. The guest operating system boots exactly as it would on real hardware. When it executes instructions, the CPU runs most of them directly; sensitive operations such as touching hardware are trapped and handled by the hypervisor.
- Isolation: a crash or compromise inside one VM does not affect the others.
- Consolidation: many small workloads share one large server instead of wasting idle hardware.
- Portability: a VM is just files and configuration, so it can be snapshotted, copied, backed up or moved to another host.
Main types of virtualization
| Type | What is shared | Examples |
|---|---|---|
| Full / hardware virtualization | Only the physical hardware; each VM has its own kernel | KVM, VMware ESXi, Hyper-V, Xen HVM |
| Paravirtualization | Hardware, with a guest kernel that knows it is virtualised | Xen PV, virtio drivers |
| OS-level (containers) | The host kernel; each container has its own userspace | LXC, OpenVZ, Docker |
Hypervisors are further split into type 1 (bare metal) and type 2 (hosted). See type 1 vs type 2 hypervisors for the details.
Virtualization and VPS hosting
A virtual private server is simply a VM rented from a provider. The provider runs a hypervisor such as KVM on powerful hosts and uses a panel like Virtualizor or VirtFusion to create, resize and reinstall VMs for customers. You get root access and your own kernel, while the provider handles the hardware. Read hosting types compared to see where a VPS sits between shared hosting and a dedicated server.
Benefits and limits
- Benefits: efficient hardware use, fast provisioning, snapshots, easy scaling and strong isolation.
- Limits: a small overhead compared with bare metal, and resources such as disk I/O are shared with neighbours unless the provider reserves them.
Frequently asked questions
Is virtualization the same as cloud computing?
No. Virtualization is the underlying technology; cloud computing adds self-service, APIs and billing on top of it.
Does a virtual machine run slower than a real server?
With hardware-assisted virtualization and virtio drivers the overhead for CPU work is usually only a few percent. Disk and network performance depend more on the host's storage and load.
Are containers virtualization?
Yes, a lighter form. Containers share the host kernel instead of emulating hardware, so they start faster but offer weaker isolation than full VMs.
Do I need special hardware?
Modern hypervisors need CPU virtualization extensions (Intel VT-x or AMD-V), which nearly every server CPU sold in the last decade includes.
