📚 Legacy Documentation
Notice: This is the legacy documentation. For the latest features and updates, refer to our current SolusVM documentation.
Converting CentOS 7 to VZ7 for installing SolusVM on it
On this page
According to the official Virtuozzo 7 information, the proper and reliable way to use OpenVZ 7 virtualization is to deploy the server using Virtuozzo 7 ISO image from https://download.openvz.org/virtuozzo/releases/7.0/x86_64/iso/
If due to whatever reason there is no way to deploy the server using ISO, there is also a way to convert CentOS 7 to VZ7. Such scenario is not fully supported by SolusVM and should be performed on the server’s owner risk
Preparing partitioning on CentOS 7 node for conversion
Before proceeding with installing vzkernel, it is required to prepare
the server to match the requirements of Virtuozzo 7. The main part here
is to have a dedicated EXT4 partition mounted on /vz.
Mount a specifically created partition or a logical volume (it’s a
preferable way, it will be easier to extend it if required). The file
system on the partition/volume must be ext4. Do not forget to add
the corresponding mount point to /etc/fstab.
Here are the sample steps on how to achieve that in case there is a
second drive /dev/sdb. Note that steps are just an example.
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 64G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 21G 0 part
├─centos-root 253:0 0 20G 0 lvm /
└─centos-swap 253:1 0 1G 0 lvm [SWAP]
sdb 8:16 0 64G 0 diskvgcreate vz /dev/sdb
Physical volume "/dev/sdb" successfully created.
Volume group "vz" successfully createdlvcreate -n vz -l 100%FREE /dev/vz
Logical volume "vz" created.mkfs.ext4 /dev/vz/vzmkdir /vzmount /dev/vz/vz /vzecho "/dev/vz/vz /vz ext4 defaults 1 1" >> /etc/fstabOverall The result should be similar to the following one:
df -hT /vz
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vz-vz ext4 50G 827M 46G 2% /vzType must be ext4 and it must be me mounted on /vz.
Doing the conversion
Once /vz partition is prepared, we can go ahead with the conversion.
Install python sub-processes, the latest OpenVZ 7 release, Epel repository, prctl utility, OpenVZ kernel and ploop packages:
yum localinstall https://download.openvz.org/virtuozzo/releases/openvz-7.0.11-235/x86_64/os/Packages/p/python-subprocess32-3.2.7-1.vz7.5.x86_64.rpm -yyum localinstall https://download.openvz.org/virtuozzo/releases/openvz-7.0.11-235/x86_64/os/Packages/o/openvz-release-7.0.11-3.vz7.x86_64.rpm -yyum install epel-release -yInstall vzlinux release:
yum install python3 -yrpm -Uvh http://repo.virtuozzo.com/vzlinux/7/x86_64/os/Packages/r/readykernel-scan-0.11-1.vl7.noarch.rpmrpm -Uvh http://repo.virtuozzo.com/vzlinux/7/x86_64/os/Packages/z/zstd-1.4.4-1.vl7.x86_64.rpmrpm -Uvh http://repo.virtuozzo.com/vzlinux/7/x86_64/os/Packages/v/vzlinux-release-7-1.vl7.91.x86_64.rpmMove CentOS repositories to another location to avoid package conflicts in future:
mv /etc/yum.repos.d/CentOS-* /root/Re-install json-c and jansson packages from virtuozzo repositories:
rpm -e --nodeps --justdb json-cyum erase jansson -yyum localinstall http://repo.virtuozzo.com/vzlinux/7.7/x86_64/os/Packages/j/jansson-2.10-1.vl7.1.x86_64.rpm -yyum localinstall http://repo.virtuozzo.com/vzlinux/7.7/x86_64/os/Packages/j/json-c-0.11-13.vl7.1.x86_64.rpm -yRe-install nss packages:
rpm -e --nodeps --justdb nspr nss nss-pem nss-softokn nss-softokn-freebl nss-sysinit nss-tools nss-utilyum localinstall http://repo.virtuozzo.com/vzlinux/7/x86_64/os/Packages/n/nss-3.44.0-7.vl7.x86_64.rpm -yyum downgrade glibc*yum install nss-softokn-freebl.i686 nss-tools -yInstall the necessary packages:
yum install prlctl prl-disp-service vzkernel *ploop* -y && yum update -yIf the action above fails with the error “Protected multilib versions: zlib-1.2.7-18.vl7.i686 != zlib-1.2.7-19.el7_9.x86_64”, downgrade zlib package:
yum downgrade zlibFor OVH servers - update grub configuration:
mkdir /boot/efi/EFI/virtuozzomv /boot/efi/EFI/centos ~/grub2-set-default 1grub2-mkconfig -o /boot/efi/EFI/virtuozzo/grub.cfgReboot the node:
rebootEnable ploop kernel modules:
```
modprobe ploop pfmt_ploop1 pfmt_raw pio_direct
```
- Update the conversion script:
```
wget -O /usr/libexec/ovz-template-converter https://raw.githubusercontent.com/solusvm-support/svm_patches/master/ovz-template-converter.patched && chmod +x /usr/libexec/ovz-template-converter
```
```
rpm -e --nodeps --justdb python3-pip
```
```
yum install -y python36-pip python-configobj && pip3 install configobj
```
- Install EZ packages:
```
yum install -y *ez.noarch
```
There is a probability that mariadb-libs package is installed already on the server from CentOS 7 repositories. It will conflict with mariadb-* packages upon installation of SolusVM Master software. Check this as below and remove the package prior to installation of SolusVM Master software:
Check if the package is installed:
rpm -qa | grep mariadb-libsRemove the package:
rpm -e --nodeps --justdb mariadb-libs
The conversion is done. Feel free to install SolusVM on it:
curl -o install.sh https://files.soluslabs.com/install.sh && sh install.sh