KVM vs OpenVZ / LXC

KVM vs OpenVZ: why the virtualisation type matters

Short answer

KVM is full hardware virtualisation: your instance runs its own kernel and cannot see the host. OpenVZ and LXC are container technologies that share the host kernel, which means no custom kernel modules, no WireGuard on older hosts, unreliable Docker, and memory accounting that lets the provider oversell. If a VPS is unusually cheap, it is usually OpenVZ.

KVM vs OpenVZ / LXC — side by side
DimensionKVMOpenVZ / LXC
KernelYour ownShared with the host
Custom kernel modulesYesNo
DockerFully supportedUnreliable or unsupported
Nested virtualisationYesNo
Non-Linux systemsFreeBSD, OpenBSD, WindowsLinux only
Memory guaranteeTruly reservedFrequently oversold
Overhead2–5%Near zero
SwapReal swapEmulated or absent

Which should you choose?

KVM

Choose KVM for anything real. Every OnionVPS instance is KVM, without exception.

OpenVZ / LXC

OpenVZ is defensible only for the very cheapest single-purpose containers where you control nothing about the kernel.

Frequently asked questions

Can I run Docker on an OpenVZ VPS?

Usually not, and where it appears to work it depends on unsafe host configuration. Docker needs cgroups and namespaces that container-based virtualisation does not expose. Use KVM.

How do I tell whether a VPS is KVM or OpenVZ?

Run systemd-detect-virt, or check whether uname -r shows a kernel you can replace. On OpenVZ you cannot install a different kernel at all.