Create VPS

To create new Virtual Private Server, run the vps-post-config.pl script:

./vps-post-config.pl VPS_HOST_NAME

And put the following parameters to STDIN:

IP=ADDRESS:MASK:HDEV - IP to be assigned to this VPS and allowed on network interface HDEV on your VPS box;

DLIMIT=XXXX - Disk limit in Mb;

MLIMIT=XXXX - Memory Limit in Mb;

PLIMIT=XXXX - Limit on the number of running processes;

FILELIMIT=XXXX - Number of opened files limit;

TCPLIMIT=XXXX - TCP sockets limit;

ROOTPWD=**** - User root password;

CTRL+D - Press Ctrl+d to stop data input.

Example:

Create a VPS with the following configuration:

Hostname: 231.tst

IP address: 192.168.112.231, mask: 255.255.255.0

Disk limit: 3000Mb

Memory limit: 512Mb

Limit on the number of running processes: 1000

Root password: 1

[root@vps scripts]# ./vps-post-config.pl 231.tst

IP=192.168.112.231:255.255.255.0[press Enter] 
DLIMIT=3000[press Enter] 
MLIMIT=512[press Enter] 
PLIMIT=1000[press Enter] 
ROOTPWD=1[press Enter] [press Ctrl+d] (end of data input)

vps-post-config.pl creates the $HSVPSFILES/231.tst/231.tst.in file (Default: /hsphere/local/config/vserver/cp/231.tst/231.tst.in) with the input parameters, and registers VPS in the list of known vservers: $VPSCONFIGS/vps.list (Default: /hsphere/local/config/vserver/vps.list)

Check the list of VPSs:

[root@vps scripts]# cat /hsphere/local/config/vserver/vps.list

You would get something like this:

DELETE=""
VSERVERS="3:231.tst"

Format:

DELETE="HOSTNAME1 HOSTNAME2 HOSTNAME3" - the list of VPSs scheduled for deletion, separated with whitespaces;

VSERVERS="CONTEXT_ID1:HOSTNAME1 CONTEXT_ID2:HOSTNAME2" - the list of known VPSs, separated with whitespaces;

CONTEXT_ID is a virtual server ID