Here you can search and view our site Knowledge Base.
To find a specific article, use KB-article number format (ex. KB-1)

Article number: Article number: kb-46
Q. How to install OpenVZ Virtualization on CentOS 6

A. OpenVZ Virtualization quick installation

This document briefly describes the steps needed to install OpenVZ on your RHEL 6 (CentOS 6, Scientific Linux 6) machine.

# cd /etc/yum.repos.d
# wget
# rpm --import
# yum install ovzkernel.x86_64 vzctl.x86_64 vzquota.x86_64
# yum install vzctl vzquota ploop

To disable SELinux change the file
# vi /etc/sysconfig/selinux
and add the line

# reboot

How to download OS Templates?

Precreated template caches for different distributions. To install, download and put to the host system's /vz/template/cache directory.

# cd /vz/template/cache/
# wget
# wget
# wget
# wget
# wget
# wget
# wget
# wget

Creating Container

After the Container ID and the installed OS template have been chosen, you can create the Container private area with the vzctl create command. The private area is the directory containing the actual files of the given Container; it is usually residing in /vz/private/CTID/. The private area is mounted to the /vz/root/CTID directory on the Hardware Node and provides Container users with a complete Linux file system tree.

For example, you can create a new Container CTID with centos-6-x86_64-minimal, by typing the following string:

# vzctl create CTID --ostemplate centos-6-x86_64-minimal
# vzctl set CTID --save --name HOSTNAME
# vzctl set CTID --save --onboot yes
# vzctl set CTID --save --hostname HOSTDOMAIN
# vzctl set CTID --save --ipadd IPADDRES
# vzctl set CTID --save --searchdomain HOSTDOMAIN
# vzctl set CTID --save --nameserver --nameserver
# vzctl set CTID --save --cpus 1
# vzctl set CTID --save --ram 1G
# vzctl set CTID --save --swap 1G
# vzctl set CTID --save --diskspace 50g
# vzctl set CTID --save --quotaugidlimit 50
# vzctl set CTID --userpasswd root:password
# vzctl start CTID
# vzctl enter CTID

OpenVZ Commands

# vzctl start CTID
# vzctl restart CTID
# vzctl status CTID
# vzctl stop CTID
# vzctl destroy CTID

# vzmemcheck -v
# vzcpucheck -v
# vzlist -a

This page has been viewed 4471 times

Other questions in this category Other questions in this category
1. How to install cPanel & WHM? (viewed 772 times)
2. How to Install-Uninstall Clam Antivirus? (viewed 743 times)
3. How to install wget command on CentOS? (viewed 712 times)
4. How to install Webmin on CentOS? (viewed 706 times)
5. How to enable and run MySQL/MariaDB on CentOS 7? (viewed 683 times)
6. How To Install cPanel on a Virtual Server Running Centos 6? (viewed 664 times)
7. How to Uninstall MySQL? (viewed 660 times)
8. How to install VNC on CentOS? (viewed 578 times)

Return to Search

Back to Top