OpenVZ is a container-based virtualization technology that made very cheap VPS plans possible. Instead of emulating hardware, every VPS (called a container or CT) runs on one shared, patched Linux kernel. Virtuozzo is the commercial product built on the same ideas. This guide explains how it works and its limits.
Before you start
- Read containers vs virtual machines for background.
How OpenVZ works
- The host runs a special kernel with container isolation and resource accounting.
- Each container has its own root filesystem, users, processes, IP addresses and init system.
- There is no virtual hardware; processes run directly on the host kernel, so overhead is minimal.
- Resources are controlled by limits (memory, CPU units, disk quota, process counts).
OpenVZ 6 vs OpenVZ 7
| OpenVZ 6 | OpenVZ 7 | |
|---|---|---|
| Kernel base | Very old RHEL 6-era kernel | Newer RHEL 7-based Virtuozzo kernel |
| Status | End of life; avoid | Maintained as part of the Virtuozzo ecosystem |
| Resource model | User beancounters (UBC) | cgroups-based, vSwap |
| Modern distros | Many do not boot (systemd needs newer kernels) | Better support |
Limits of a shared kernel
- No custom kernel or modules: you cannot load WireGuard, change TCP congestion control system-wide or use ZFS.
- Docker: may not work or only partially, depending on host features.
- Swap: you cannot create a swap file; vSwap is controlled by the host.
- Kernel version:
uname -rshows the host kernel, which you cannot upgrade. - Isolation: a host kernel vulnerability affects every container.
How to tell if your VPS is OpenVZ
systemd-detect-virtIt prints openvz. You will also see /proc/vz or /proc/user_beancounters.
Check resource limits
On OpenVZ 6-style containers:
cat /proc/user_beancountersA non-zero failcnt column means you hit that limit (often memory). Memory usage reported by free can be misleading; rely on your plan's limits.
Should you choose OpenVZ today?
- Fine for simple web servers or bots on a tiny budget, on OpenVZ 7 or newer.
- Choose KVM if you need Docker, VPNs, custom kernels, Windows or predictable isolation. See KVM vs OpenVZ vs LXC.
Frequently asked questions
Can I run WireGuard on OpenVZ?
Not as a kernel module. A userspace implementation like wireguard-go may work if the host allows TUN devices.
Why can't I add swap on my VPS?
Containers cannot activate swap; the host manages it.
Is OpenVZ the same as LXC?
Similar idea, different implementation. LXC uses mainline kernel features; OpenVZ uses its own patched kernel.
