DED9

OpenVZ: A Complete Guide to Container-Based Virtualization for Linux

Long before Docker made containers a household word among developers, a technology called OpenVZ was already packing dozens of isolated Linux servers onto a single physical machine. Short for “Open Virtuozzo,” OpenVZ is one of the oldest and most battle-tested container-based virtualization platforms for Linux. It has quietly powered a huge share of the budget virtual private server (VPS) market for close to two decades, and it remains a practical, high-efficiency choice for hosting providers today.

This guide explains what OpenVZ is, how its shared-kernel architecture works, how it differs from full virtualization and modern container tools, and where it still fits in the virtualization landscape.

What Is OpenVZ?

What Is OpenVZ?

OpenVZ is an operating-system-level virtualization technology for Linux. It lets a single physical server run multiple isolated operating-system instances, commonly referred to as containers, virtual environments (VEs), or virtual private servers (VPSs). Each container behaves almost exactly like a standalone server: it has its own root user, users and groups, processes, files, system libraries, IP addresses, and configuration, and it can be rebooted independently.

The defining characteristic of OpenVZ is that all of these containers share a single Linux kernel. This is fundamentally different from technologies such as VMware, Xen, KVM, and Hyper-V, which use a hypervisor to emulate complete hardware and can therefore run different operating systems and even different kernel versions side by side. OpenVZ trades that flexibility for speed and density. Because there is no hypervisor layer and no hardware emulation, the overhead is minimal, and a single host can support many more instances.

OpenVZ is free and open-source software, released under the GNU General Public License, and it forms the technical foundation of Virtuozzo, a commercial virtualization product aimed at hosting companies and enterprises.

How OpenVZ Works: The Shared-Kernel Model

At its core, OpenVZ relies on a modified Linux kernel that adds container support on top of standard Linux functionality. This kernel provides four essential capabilities: virtualization, isolation, resource management, and checkpointing.

Because every container runs on the same kernel, they must all use the same architecture and kernel version, and they must all run Linux. You cannot run Windows or a BSD inside an OpenVZ container, and you cannot load a custom kernel module for just one container. In exchange, containers start almost instantly, consume very little memory when idle, and let unused resources flow to wherever they are needed. Memory allocation is “soft,” meaning RAM that one container is not using can be reclaimed for other containers or used for disk caching, which is a major reason OpenVZ achieves such high density.

Isolation is what keeps these shared-kernel containers from interfering with one another. Process IDs are virtualized, so the init process inside each container appears as PID 1 exactly as it would on a dedicated machine, and a container can only see its own processes. Each container gets a virtualized /proc and /sys, its own network stack and IP addresses, and, in current versions, its own file system rather than a shared directory tree. By default, OpenVZ also blocks container access to real physical devices, which keeps containers hardware-independent; an administrator can selectively grant access to disks, USB ports, PCI devices, or network cards when needed.

Resource Management

One of OpenVZ’s strongest features is fine-grained control over how host resources are divided among containers. Its resource management system has traditionally rested on four pillars, and crucially, these limits can be changed while a container is running, with no reboot required.

The first pillar is a two-level disk quota. The administrator sets quotas per container measured in disk blocks and inodes, and inside the container, standard UNIX tools can further apply per-user and per-group quotas. The second is a fair CPU scheduler that also works in two levels: the scheduler first decides which container receives a time slice based on configurable CPU units, then the standard Linux scheduler picks which process inside that container runs. Administrators can also impose hard limits, capping a container to a percentage of total CPU time, restricting the number of cores it can use, or pinning it to a specific set of CPUs.

The third pillar is a two-level disk I/O scheduler that assigns each container an I/O priority and distributes available bandwidth accordingly, so no single container can saturate the disk. The fourth, and historically the most distinctive, is User Beancounters (UBC), a set of per-container counters, limits, and guarantees designed to stop any one container from monopolizing kernel resources such as memory and network buffers. Each tracked resource exposes its current usage, its peak usage, a barrier, a limit, and a failure counter, giving administrators precise visibility into how containers are behaving.

OpenVZ vs. Other Virtualization Technologies

Understanding OpenVZ is easiest when you compare it to the alternatives. Against full virtualization platforms like KVM or VMware, the trade-off is clear: those hypervisors can run any operating system and offer stronger isolation at the hardware level, but they carry more overhead and lower density. OpenVZ runs Linux only and shares one kernel, but it is dramatically lighter and faster, which is exactly why it dominates low-cost VPS hosting.

Against modern container tools, the comparison is more nuanced. OpenVZ and LXC are both “system container” technologies: a container runs a full init system and multiple long-lived processes, behaving like a lightweight virtual server. Docker, by contrast, popularized the “application container” model, where a container typically wraps a single application and its dependencies as an immutable image, often treated as ephemeral. OpenVZ and Docker are therefore solving somewhat different problems. In fact, the OpenVZ team was for years one of the largest contributors to the upstream Linux container ecosystem, helping build foundational features such as PID and network namespaces, the memory controller, and checkpoint/restore that later technologies, including Docker, rely on.

Live Migration and Checkpointing

A standout capability of OpenVZ is live migration, which has been available since 2006. Through a process called checkpointing, a running container can be frozen and its entire state saved to a file on disk. That file can be transferred to another physical server, where the container is restored and resumes running, usually within a few seconds. Because the container’s state is preserved almost completely, the pause can look like nothing more than an ordinary computational delay.

This functionality is now built on CRIU (Checkpoint/Restore In Userspace), an open-source Linux tool that freezes a running application and saves it as a collection of files that can later be used to restore it. A related project, P.Haul, implements the live-migration workflow on top of CRIU. For hosting providers, this means containers can be moved off a server for maintenance or hardware upgrades without visible downtime for customers.

OpenVZ 7 and the Virtuozzo Connection

The most significant modern milestone for the project was the release of OpenVZ 7, which reshaped how the technology is packaged and used. Earlier versions were distributed as a set of kernel patches and userspace tools that you installed on top of an existing Linux system. OpenVZ 7 instead became a complete Linux distribution in its own right, based on VzLinux and shipping with a RHEL-based kernel.

Just as importantly, OpenVZ 7 merged the OpenVZ and Virtuozzo code bases and replaced the project’s old proprietary hypervisor with Linux’s built-in KVM/QEMU. As a result, a single OpenVZ 7 node can now run both lightweight Linux containers and full KVM virtual machines, including Windows guests, side by side. Management shifted toward standard Linux tooling such as libvirt and virt-manager, alongside the prlctl command-line utility, so administrators familiar with managing virtual machines through libvirt can manage them the same way here.

OpenVZ remains the free, open-source portion of the wider Virtuozzo platform. The commercial Virtuozzo product builds on the same core and adds capabilities that hosting businesses often want, including distributed software-defined storage, automated container and VM backups, ReadyKernel live kernel patching (which applies kernel updates without a reboot), automatic memory management policies, and 24×7 technical support.

 

The appeal of OpenVZ comes down to efficiency and density. Because containers share a kernel and carry no hypervisor overhead, a single server can host far more instances than a comparable hardware-virtualization setup, which lowers cost per VPS. Containers start quickly, use memory efficiently thanks to soft allocation, and can have their resources returned on the fly. The technology scales as well as the underlying Linux kernel, up to very large numbers of CPUs and large amounts of RAM. For providers, live migration and mature resource controls add operational flexibility that is hard to match at the same price point.

Limitations to Consider

The shared-kernel design also creates real constraints. Every container must run Linux and share the host’s kernel and architecture, so you cannot mix kernel versions or run non-Linux guests inside a container. Historically, containers on older OpenVZ kernels also faced limitations around swap usage, clock control, and certain networking features; for example, VPN support was limited to PPP-based options and TUN/TAP, with IPsec becoming available only in later kernels. Isolation, while strong, is not identical to the hardware-level separation a full hypervisor provides, which can matter in the most security-sensitive multi-tenant scenarios. These trade-offs are exactly why some platforms, such as Proxmox VE, eventually shifted their container support from OpenVZ to LXC.

Common Use Cases

OpenVZ’s sweet spot is high-density Linux hosting. It is widely used to power affordable VPS plans, where a provider carves one powerful server into many isolated customer environments. It suits web hosting, application hosting, development, and testing sandboxes, and any workload that benefits from running many lightweight Linux servers efficiently. With KVM support added in OpenVZ 7, a single node can now also serve mixed workloads, combining Linux containers with full virtual machines for customers who need a different operating system.

Conclusion

OpenVZ occupies a distinctive place in the virtualization world. It is not trying to be Docker, and it is not trying to be KVM; it is a mature, open-source system-container platform built for running many isolated Linux servers on shared hardware with minimal overhead. Its shared-kernel model imposes clear limits, but in exchange, it delivers the density, speed, and cost efficiency that have kept it at the heart of the budget VPS market for years. With OpenVZ 7 folding in KVM virtualization and aligning closely with the commercial Virtuozzo platform, the project continues to evolve into a hybrid solution that blends the best of containers and virtual machines, remaining a solid, relevant choice for efficiency-focused hosting.

FAQ

Is OpenVZ free to use?

Yes. OpenVZ is free and open-source software released under the GNU GPL. It also serves as the technical foundation of Virtuozzo, a commercial product that adds features like software-defined storage, automated backups, live kernel patching, and paid support.

What is the difference between OpenVZ and KVM?

OpenVZ is OS-level virtualization: all containers share a single Linux kernel, so it runs Linux only but is extremely lightweight and high-density. KVM is full virtualization that emulates hardware, so it can run any operating system, including Windows, but with more overhead and fewer instances per server.

Can OpenVZ run Windows?

Not inside a container. Because containers share the host's Linux kernel, they can only run Linux. However, OpenVZ 7 integrated KVM, so a single OpenVZ 7 host can run full virtual machines, including Windows, alongside its Linux containers.

Exit mobile version