Article ID: 6822, created on Oct 29, 2009, last review on Aug 12, 2014

  • Applies to:
  • Virtuozzo containers for Linux 4.0


There are several points you should pay attention to during an upgrade from OpenVZ to Parallels Virtuozzo Containers 4.0 (In this example, the PVC distributive is located in the /root/Rel400/ directory).

1. Make a proper link for the "/etc/vz/vz.conf" config file:
# cd /root
# tar -czf vz.tgz /etc/vz/
# rm -f /etc/sysconfig/vz
# cp -a /etc/vz/vz.conf /etc/sysconfig/vz
# mv /etc/vz/vz.conf /etc/vz/vz.conf.orig
# ln -s /etc/sysconfig/vz /etc/vz/vz.conf

2. Install the "rpm-build" package:
# yum install rpm-build

3. If the vzctl-4.0.0-191.swsoft or vzctl-4.0.0-215.swsoft package is installed, remove it from the RPM DB:
# rpm -e --nodeps --noscripts --notriggers vzctl vzctl-lib

4. Install Parallels Virtuozzo Containers 4.0:
# cd /root/Rel400
# ./install

Do not reboot the node after the installer finishes!

5. Install the latest PVC kernel:
# vzup2date -s -m batch --core --loader-autoconfig install

6. Adjust the tcp_mem and pid_max settings:
# echo "net.ipv4.tcp_mem = 786432 1048576 1572864" >> /etc/sysctl.conf
# echo "kernel.pid_max = 65536" >> /etc/sysctl.conf

7. Set the required iptables modules in the /etc/sysconfig/iptables-config file and /etc/sysconfig/vz file, as described in this KB article.

8. If you plan to use SLM, please enable it in the /etc/sysconfig/vz config file:
## SLM parameters

9. Restart the node in the PVC kernel:
# shutdown -fr now &&exit

10. When the node is up, check that it is loaded into the new kernel correctly, e.g.:
[root@server ~]# uname -a
Linux servername.tld 2.6.18-028stab064.8 #1 SMP Fri Nov 6 11:28:25 MSK 2009 x86_64 x86_64 x86_64 GNU/Linux

11. Run the vzup2date utility and apply all required updates:
# vzup2date


1. If Containers cannot start automatically after the system's reboot, it might be necessary to convert the format of Containers' private areas with the sim2vzfs utility.

2. If OpenVZ node used the 32-bit PAE build of kernel before the upgrade, and the node has RAM of 8GB or more, it is recommended to install the enterprise build of the PVC kernel.

The corresponding packages may be found in the directory "/vz/vzup2date/4.0.0/CU-${version}" (e.g., /vz/vzup2date/4.0.0/CU-2.6.18-028stab062.3/) or "/vz/vzup2date/virtuozzo/linux/i386/4.0.0/CU-${version}" (e.g., "/vz/vzup2date/virtuozzo/linux/i386/4.0.0/CU-2.6.18-028stab064.8/"). Example: {clb# ls -l /vz/vzup2date/virtuozzo/linux/i386/4.0.0/CU-2.6.18-028stab064.8/
total 75200
-rw-r--r-- 1 root root 19604240 Nov 6 18:52 vzkernel-2.6.18-028stab064.8.i686.rpm
-rw-r--r-- 1 root root 5307497 Nov 6 18:52 vzkernel-devel-2.6.18-028stab064.8.i686.rpm
-rw-r--r-- 1 root root 19554099 Nov 6 18:52 vzkernel-ent-2.6.18-028stab064.8.i686.rpm
-rw-r--r-- 1 root root 5396307 Nov 6 18:52 vzkernel-ent-devel-2.6.18-028stab064.8.i686.rpm
-rw-r--r-- 1 root root 19640589 Nov 6 18:52 vzkernel-PAE-2.6.18-028stab064.8.i686.rpm
-rw-r--r-- 1 root root 5391995 Nov 6 18:52 vzkernel-PAE-devel-2.6.18-028stab064.8.i686.rpm
-rw-r--r-- 1 root root 655766 Nov 6 18:52 vzmodules-2.6.18-028stab064.8.i686.rpm
-rw-r--r-- 1 root root 653156 Nov 6 18:52 vzmodules-ent-2.6.18-028stab064.8.i686.rpm
-rw-r--r-- 1 root root 657415 Nov 6 18:52 vzmodules-PAE-2.6.18-028stab064.8.i686.rpm

In this example, you may install the enterprise version of the PVC 4.0 kernel using this command:
# rpm -ihv /vz/vzup2date/virtuozzo/linux/i386/4.0.0/CU-2.6.18-028stab064.8/vzkernel-ent-2.6.18-028stab064.8.i686.rpm /vz/vzup2date/virtuozzo/linux/i386/4.0.0/CU-2.6.18-028stab064.8/vzmodules-ent-2.6.18-028stab064.8.i686.rpm

35c16f1fded8e42577cb3df16429c57a d02f9caf3e11b191a38179103495106f e8e50b42231236b82df27684e7ec0beb 2897d76d56d2010f4e3a28f864d69223

Email subscription for changes to this article
Save as PDF