Sunday, May 27, 2018

How to install OpenVZ 7 to CentOS 7 server


Install OpenVZ kernel

1. Go to https://download.openvz.org/virtuozzo/releases/ and choose latest OpenVZ release, in my case this is openvz-7.0.7-359 release
And install python-subprocess package

# yum localinstall https://download.openvz.org/virtuozzo/releases/openvz-7.0.7-359/x86_64/os/Packages/p/python-subprocess32-3.2.7-1.vz7.3.x86_64.rpm

And OpenVZ release package
# yum localinstall yum localinstall https://download.openvz.org/virtuozzo/releases/openvz-7.0.7-359/x86_64/os/Packages/o/openvz-release-7.0.7-1.vz7.x86_64.rpm

And install openvz kernel with necessary packagges
# yum install prlctl prl-disp-service vzkernel ploop ploop-lib python-ploop --nogpgcheck


Then need to change default boot kernel

# awk -F\' /^menuentry/{print\$2} /etc/grub2.cfg
Virtuozzo 7 (3.10.0-693.21.1.vz7.50.2)
CentOS Linux (3.10.0-862.2.3.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-9063ac396d784f4c997ceacdd0590c25) 7 (Core)

Sort starts from 0, in my case need to execute 

# grub2-set-default 0

And check result

# cat /boot/grub2/grubenv |grep saved
saved_entry=Virtuozzo 7 (3.10.0-693.21.1.vz7.50.2)

And last step - rebuild grub config

grub2-mkconfig -o /boot/grub2/grub.cfg

Now you can reboot server 

Tested on CentOS Linux release 7.5.1804 (Core) 

No comments:

Post a Comment

grub2-install: error: disk `mduuid/e54081d398c6d57b4d67436f6d032162' not found

After raid 1 disk replacement faced with this issue # grub2-install /dev/sdb Installing for i386-pc platform. grub2-install: error: disk `md...