Linux > Virtualization

How to install and configure OpenVZ On CentOS 6.4 version

(1/1)

mohitht:
Hi All,

OpenVZ is an operating system-level virtualization technology based on the Linux kernel and operating system. OpenVZ allows a physical server to run multiple isolated operating system instances, known as containers, Virtual Private Servers, or Virtual Environments. .

First add OpenVz repository so go to the yum.repos.d

# cd /etc/yum.repos.d

wget http://download.openvz.org/openvz.repo

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

edit the openvz.repo and change the rhel5 repo value to "enabled=0"
and set Rhel6 "enabled=1"

Then install

# yum install vzkernel

Then install the OpenVZ tools as follows

# yum install vzctl vzquota

Set the values in # vi /etc/sysctl.conf as below



* net.ipv4.ip_forward = 1

net.ipv4.conf.default.proxy_arp = 0

net.ipv4.conf.all.rp_filter = 1

kernel.sysrq = 1

net.ipv4.conf.default.send_redirects = 1

net.ipv4.conf.all.send_redirects = 0

net.ipv4.icmp_echo_ignore_broadcasts=1

net.ipv4.conf.default.forwarding=1

After setting the value run
# sysctl -p


Edit the # vi /etc/vz/vz.conf
File and include

NEIGHBOUR_DEVS=all

we need to set the SElinux value to disabled
# vi /etc/sysconfig/selinux


Finally reboot the system

# reboot

while booting select the kernel
and check the kernel version by

# uname -r




Try it  :)

Thanks for your time  :)

Navigation

[0] Message Index

Go to full version