Resolution
There are several points you should pay attention to during upgrade from OpenVZ to Parallels Virtuozzo Containers 4.0 (PVC distributive is located in this example in /root/Rel400/ directory).1. Make proper link for "/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.conf2. Install "rpm-build" package:
# yum install rpm-build3. In case the package vzctl-4.0.0-191.swsoft or vzctl-4.0.0-215.swsoft is installed, please remove it from RPM DB:
# rpm -e --nodeps --noscripts --notriggers vzctl vzctl-lib4. Install Parallels Virtuozzo Containers 4.0:
# cd /root/Rel400
# ./installDo not reboot the node at the end of installer!
5. Install the latest PVC kernel:
# vzup2date -s -m batch --core --loader-autoconfig install6. Adjust tcp_mem settings:
# echo "net.ipv4.tcp_mem = 786432 1048576 1572864" >> /etc/sysctl.conf7. Set required iptables modules in /etc/sysconfig/iptables-config file and /etc/sysconfig/vz file, as described in the KB article.
8. If you plan to use SLM, please enable it in /etc/sysconfig/vz config file:
## SLM parameters
SLM="yes"
SLMPATTERN="default"
9. Restart the node in PVC kernel:
# shutdown -fr now &&exit10. When node is up, check that it is loaded into 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/Linux11. Run 'vzup2date' utility and apply all required updates:
# vzup2dateNotes:
1. If Containers cannot start automatically after the system's reboot, it might be necessary to convert the format of Containers' private areas with 'sim2vzfs' utility.
2. In case OpenVZ node used 32-bit PAE build of kernel before the upgrade, and the node has RAM 8Gb or higher, it is recommended to install enterprise build of PVC kernel.
The corresponding packages you may find 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 enterprise version of 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