vzupgrade tool can be used to upgrade VHS 7 to 8 and CentOS 7 to VzLinux 8.
Normally, the vzupgrade script should be installed via the RPM package from VzLinux repos:
yum install -y yum-utils
yum-config-manager --add-repo http://repo.virtuozzo.com/vzlinux/7/x86_64/os/
yum install -y --nogpgcheck vzupgrade
Make sure to disable the VzLinux repo before real upgrade
rm -f /etc/yum.repos.d/repo.virtuozzo*
Before running vzupgrade, install all CentOS updates:
yum update -y
Now run the pre-upgrade check, for CentOS one should use "--skip-vz" option:
vzupgrade check --skip-vz
For upgrading VHS 7 to VHS 9, one should use "--use-vz9" option:
vzupgrade check --use-vz9
If no problems were found, run the upgrade itself. For CentOS 8 to VzLinux 8:
vzupgrade install --skip-vz
Or for upgrading VHS 7 to VHS 9:
vzupgrade check --use-vz9
The system will be rebooted into a special mode (using "Upgrade-initramfs" initrd image). One can specify --reboot option to make this reboot happen automatically.
Once the upgrade is finished, the system will be automatically rebooted once again into upgraded system.
Pre-check and pre-upgrade hooks
The tool supports launching custom scripts before the check and before the upgrade phases. All executable files found inside the /usr/share/vzupgrade/pre-check folder will be launched just before the check, and all executable files found inside the /usr/share/vzupgrade/pre-install folder will be launched just before the upgrade stage starts.
The scripts are executed in the alphabetical order, so we recommend to add a numeric prefix to every script indicating its launch order, e.g. "01-prepare", "02-"almost-ready", etc.
Note that we don't expect these custom scripts to print anything on the screen. They should use their own log files if needed.
Also make sure that it is possible that user will launch 'check' or 'install' multiple times. The custom scripts should be ready for this.