Create openvz container from command line
Create openvz container from command line
OpenVZ is an operating system-level virtualization technology for Linux. It allows a physical server to run multiple isolated operating system instances, called containers, virtual private servers, or virtual environments
Step1.
cd /vz/template/cache/
The above location contains the templates or OS, If it doesn’t have any templates. Then
wget http://download.openvz.org/template/precreated/centos-7-x86_64-minimal.tar.gz
You can also download the preferred OS from their official sites.
Then to create a container using vzctl
Step2.
vzctl create 104 --ostemplate centos-7-x86_64 --config vswap-1g --layout simfs --diskspace 20G:20G --ipadd 5.83.7.58 --hostname box1.adminbirds.com --name box1.adminbirds.com
Here container box1.adminbirds.com with ID 104 will be created
OS = centos 7 Swap = 1 GB DIsk = 20 GB IP = 5.83.7.58 Hostname : box1.adminbirds.com
That’s all …. 🙂