Openvz quick install and creating container

Openvz quick install and creating container. Openvz it’s a virtualization program based on containers where each container can perform as a stand-alone server.

cd /tmp
wget https://raw.github.com/qrpike/CentOS-6-Quick-Install-Scripts/master/installOpenVZ.sh
chmod +x installOpenVZ.sh
./installOpenVZ.sh

Download template centos 6 – 64 bit

cd /vz/template/cache&&wget http://download.openvz.org/template/precreated/centos-6-x86_64.tar.gz

(If u need template for centos 6 – 32 bit http://download.openvz.org/template/precreated/centos-6-x86.tar.gz)

Now I will create a container with centos 6 64 bits, base configuration, Ip address  192.168.1.12 and hostname  – namecontainer.example.com

vzctl create 101 --ostemplate centos-6-x86_64 --config basic --ipadd 192.168.1.12 --hostname namecontainer.example.com

Nameserver settings and container password

vzctl set 101 --nameserver 8.8.8.8 --userpasswd root:parola --save

Space settings in format:   $softlimit$G:$hardlimit$G

vzctl set 101 --name namecontainer --diskspace 20G:20G --save

Memory setting

vzctl set 101 --ram 512M --swap 1G --save
vzctl start 101

Check if container is on

vzlist -a

Leave a Reply

Your email address will not be published. Required fields are marked *