Script for Container Creation

Script to creation of Virtuozzo Container (VPS):-
Create "container creation script" file and save this file with .sh extension (

[root@localhost ~]# vi

/usr/sbin/vzctl create 1003 --ostemplate centos-5-x86_64 --config slm.2048MB

/usr/sbin/vzctl set 1003 --onboot yes --save

/usr/sbin/vzctl set 1003 --hostname ABCD --save

/usr/sbin/vzctl set 1003 --ipadd --save

/usr/sbin/vzctl set 1003 --nameserver --save

/usr/sbin/vzctl set 1003 --userpasswd root:VpsC3arion --save

/usr/sbin/vzctl set 1003 --name XYZ --save

/usr/sbin/vzctl set 1003 --diskspace 104857600:104857600 --save

/usr/sbin/vzctl set 1003 --slmmemorylimit 4096M:4096M --save

/usr/sbin/vzctl start 1003


1003= Container ID (CTID)
centos-5-x86_64= Name of template
ABCD= Hostname of container IP address of container Name server
VpsC3arion= Password of container
XYZ= Name of container
104857600=Disk size in kb
4096M= Ram size of container

How to run this file:-

1). Set the permission of this file.

[root@localhost ~]# chmod a+x

2). Run this file.

[root@localhost ~]# ./