Installation Guide – Openvz setup in centos 6

Date Posted: 22/ 05/2019

Introduction

This article will guide you in installation of openvz on centos 6.

OpenVZ is an OS level virtualization technology for Linux. Most importantly, it allows a physical server to run multiple operating systems on it.

Prior – Requirements

Moreover, use CentOS 6, Scientific Linux on your system.

For instance, to use a separate partition for containers by default /vz directory path.

Related image

Step by step procedure to setup openvz

In addition, download openvz.repo file and put it to your /etc/yum.repos.d/ repository

wget -P /etc/yum.repos.d/ https://download.openvz.org/openvz.repo

Therefore, import OpenVZ GPG key used for signing RPM packages, as shown below

rpm --import http://download.openvz.org/RPM-GPG-Key-OpenVZ

Similarly, the signed packages you should verify the fingerprint of the key you imported into the rpm key database as described on the Package signatures page.

Kernel installation

On the other hand OpenVZ containers have no kernel, so it uses VZkernel as common and OpenVZ containers cannot be operated using Linux kernel

# yum install vzkernel

sysctl clarification

As a result, number of kernel parameters that should be set for OpenVZ to work correctly. Therefore parameters are stored in /etc/sysctl.conf file.

On Hardware Node we generally need
 packet forwarding enabled and proxy arp disabled
 net.ipv4.ip_forward = 1
 net.ipv6.conf.default.forwarding = 1
 net.ipv6.conf.all.forwarding = 1
 net.ipv4.conf.default.proxy_arp = 0
 Enables source route verification
 net.ipv4.conf.all.rp_filter = 1
 Enables the magic-sysrq key
 kernel.sysrq = 1
 We do not want all our interfaces to send redirects
 net.ipv4.conf.default.send_redirects = 1
 net.ipv4.conf.all.send_redirects = 0

Disable SELinux

SELinux should be disabled. That is to say, put SELINUX=disabled to /etc/sysconfig/selinux

Tools implementation

Above all, it needs some user-level tools installed.

# yum install vzctl vzquota ploop

Further, reboot the machine and therefore choose “OpenVZ” on the boot loader menu.

# reboot

OS templates

To sum up, download precreated template caches from Downloads » Templates » Precreated or directly from download.openvz.org/template/precreated, or from one of the mirrors.

In short, Place those tar files to the /vz/template/cache/ directory.

Thanks for using pheonix solutions.

You find this tutorial helpful? Share with your friends to keep it alive.

Leave a Reply