Virtualisation

What is KVM?

Also known as: Kernel-based Virtual Machine
Definition

KVM is full hardware virtualisation built into the Linux kernel, giving each guest its own kernel and hardware-enforced isolation from other tenants. Because a KVM guest runs its own kernel, it can load kernel modules, run non-Linux operating systems, use real swap and support nested virtualisation.

Why KVM matters

Because a KVM guest runs its own kernel, it can load kernel modules, run non-Linux operating systems, use real swap and support nested virtualisation. Memory allocated to a KVM guest is genuinely reserved, which is the practical difference from container-based virtualisation.

KVM in practice

When you run a KVM server, the first thing you check is /proc/cpuinfo in the guest — if it doesn't match the host's flags, you're likely seeing paravirtualised shortcuts, not full KVM. You set memory allocation with real reservations: overcommit will make the guest's OOM killer fire while the host looks idle. If you misconfigure nested virtualisation, you lose hardware-assisted paging and guests run at a fraction of the speed. Getting it wrong costs you performance you can't recover without a reboot.

What people get wrong about KVM

People assume KVM is the same as OpenVZ or LXC because both use the Linux kernel. The correction is that KVM gives each guest its own kernel, whereas containers share the host's kernel. You can load kernel modules and run non-Linux OSes only on KVM. Shared-namespace isolation isn't hardware-enforced.

KVM — common questions

What does KVM mean for performance?

KVM's hardware virtualisation means each guest has its own kernel, so performance is near-native for CPU and memory. Memory is genuinely reserved, not shared. You can expect predictable, isolated throughput compared to containers.

Can I run Windows on KVM?

Yes, a KVM guest runs its own kernel, so it can run non-Linux operating systems like Windows. You'll need to upload an ISO and attach a VNC console. A Windows Server licence is available as an optional extra in certain regions.

More from virtualisation

OpenVZ
OpenVZ is container-based virtualisation in which every instance shares the host kernel, so guests cannot load kernel modules or run a different operating system.
LXC
LXC is Linux-native containerisation that isolates processes with namespaces and cgroups while sharing the host kernel.
Hypervisor
A hypervisor is the software layer that creates and runs virtual machines, allocating physical CPU, memory and IO between them.
Nested virtualisation
Nested virtualisation lets a virtual machine itself run virtual machines, by exposing the processor virtualisation extensions to the guest.
vCPU
A vCPU is a virtual processor presented to a guest, backed by scheduling time on a physical core or thread.
cloud-init
cloud-init is the standard mechanism for configuring a virtual machine on first boot, using metadata supplied by the platform.