How to Install OpenVZ 7 on CentOS 7

Attention: open in a new window. PDFPrintE-mail



This is a complete guide to converting a CentOS 7 server to a OpenVZ host server.

The recommended pattern to install OpenVZ is to use the ISO and install it on the bare metal.

However, that isn't always possible, so in this tutorial, we'll explain how to install OpenVZ on CentOS.

You'll need a server with CentOS 7 x86_64 installed.

I'll be using CentOS 7.9.


Ensure you have everything up to date.

yum update && yum upgrade

Get OpenVZ releases

yum -y localinstall
#yum -y localinstall
#yum -y localinstall
yum -y localinstall
yum -y install epel-release
  • Note: If you get Requires: disp-helper-scripts, use the .15 version.


yum install python3
rpm -Uvh
rpm -Uvh
rpm -Uvh


mv /etc/yum.repos.d/CentOS-* /root/
rpm -e --nodeps --justdb json-c
yum -y erase jansson
yum -y localinstall
yum -y localinstall
rpm -e --nodeps --justdb nspr nss nss-pem nss-softokn nss-softokn-freebl nss-sysinit nss-tools nss-util
yum -y localinstall
yum -y install nss-softokn-freebl.i686 nss-tools
yum -y install prlctl prl-disp-service vzkernel *ploop*
yum -y update

Check grub

# awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
0 : Virtuozzo 7 (3.10.0-1160.42.2.vz7.184.10)
1 : CentOS Linux (3.10.0-1160.53.1.el7.x86_64) 7 (Core)
2 : CentOS Linux (0-rescue-6a03f95fe90f43b786afa291f08bbbf6) 7 (Core)

# grub2-editenv list
saved_entry=Virtuozzo 7 (3.10.0-1160.42.2.vz7.184.10)



Initial Settings

modprobe ploop pfmt_ploop1 pfmt_raw pio_direct

Install OpenVZ kernel and other packages.

yum -y install prlctl prl-disp-service vzkernel

Install quota tools

yum -y install vzctl vzquota ploop

Install all available Linux Distro templates

yum -y install *ez.noarch