Virteche
Guideschevron_rightServers

Servers · 5 min read · Updated

KVM vs Container VPS (OpenVZ and LXC): Why It Matters

A KVM VPS is a full virtual machine with its own kernel, so it behaves like a physical server: you can run Docker, WireGuard, any kernel module, and even Windows. An OpenVZ or LXC VPS is a container that shares the host's Linux kernel. That makes it lighter and cheaper to run, but you cannot change the kernel, some software does not work, and memory is often a limit within a shared pool rather than a reserved amount. If you plan to run Docker or a VPN, choose KVM.

Side by Side

KVMContainer (OpenVZ, LXC)
KernelIts own, which you can update and configureThe host's, shared with every other container
Operating systemsAny Linux, BSD or WindowsLinux only, on the host's kernel version
DockerWorks as on any serverLimited or unavailable, depending on the host
WireGuard and kernel modulesLoad what you needOnly what the host provides
MemoryA fixed amount, reserved for your serverOften a limit inside a shared pool
IsolationHardware virtualizationKernel namespaces and cgroups
OverheadSlightly moreVery little

How KVM Works

KVM is the hypervisor built into Linux. It uses the processor's virtualization features to run each VPS as a separate machine with virtual hardware: its own kernel, its own memory and its own disks. Nothing inside one VPS can see the others, and you can do anything you could on a physical server, from installing a different kernel to running Windows.

How Containers Work

OpenVZ and LXC run each VPS as a group of processes on the host's own kernel, separated by kernel features (namespaces and cgroups). There is no second kernel to boot, so containers start in seconds and use very little overhead. The catch is that everything kernel-level belongs to the host: the version, the modules loaded, and which features, such as TUN devices for VPNs or nested containers for Docker, the host chooses to allow.

Where the Difference Shows

  • Docker. It needs kernel features that many container hosts do not offer, so it fails or runs with odd limits. On KVM it works as documented; see How to run Docker on a VPS.
  • VPNs. WireGuard is a kernel module. In a container you depend on the host having it, or fall back to slower user-space versions. On KVM: How to set up WireGuard on a VPS.
  • Memory. A container's memory may be shared with others on the host, so what the plan says and what you can rely on under load can differ. A KVM server's memory is assigned to it.
  • Windows. Only possible on KVM.

Common Questions

  • Which kind of VPS does Virteche Cloud sell?

    KVM only. Every VPS has its own kernel, a fixed amount of memory and dedicated vCPU, so Docker, WireGuard, custom kernels and Windows Server all work.

  • How can I tell what kind of VPS I have?

    Run systemd-detect-virt. It prints kvm for a KVM virtual machine, and openvz or lxc for a container.

  • Are containers bad?

    No. They are light and fast, and fine for a web server or a small app. The limits only matter when you need something the shared kernel cannot give you, such as Docker, a VPN or a particular kernel version.

Every Virteche VPS is KVM, with dedicated vCPU and NVMe storage, in Ashburn and Dallas.

See VPS plans

Keep Reading

All guides