Skip to content

Create Virtual Server

Supported Versions Last Updated
1.2.00 & higher
json output 1.14.00 & higher
2013/04/29

Note: for OpenVZ "custommemory" variable has to contain an amount of burstable memory, for example:
$postfields["custommemory"] = "256:500";

where
256 - Guaranteed RAM
500 - Burstable to RAM

Action vserver-create
Method GET, POST
Variables

type [openvz|xen|xen hvm|kvm]

node (optional if nodegroup is specified)[name of node]

nodegroup (optional if node is specified)[ID of nodegroup]

hostname [hostname of virtual server]

password (optional)[root password]

username [client username]

plan [plan name]

template [template or iso name]

ips [amount of ips]
randomipv4 (optional)[true|false] false is default
hvmt (optional)[0|1] default is 0. This allows to to define templates & isos for Xen HVM

custommemory (optional)[overide plan memory with this amount]

customdiskspace (optional)[overide plan diskspace with this amount]

custombandwidth (optional)[overide plan bandwidth with this amount]

customcpu (optional)[overide plan cpu cores with this amount]

customextraip (optional)[add this amount of extra ips]

issuelicense (optional)[1|2] 1 = cPanel monthly 2= cPanel yearly

internalip (optional)[0|1] default is 0

rdtype [json] For json output specify json or for default output leave blank. This variable is optional

Example Output

XML

Success:

<status>success</status>

<statusmsg>Virtual server created</statusmsg>

<mainipaddress>123.123.123.123</mainipaddress>

<extraipaddress>122.122.122.122,111.111.111.111</extraipaddress>

<rootpassword>123456</rootpassword>

<vserverid>100</vserverid>

<consoleuser>console-123</consoleuser>

<consolepassword>123456</consolepassword>

<hostname>server.hostname.com</hostname>

<virtid>vm101|101</virtid>

<nodeid>1</nodeid>

<internalip>10.0.0.1</internalip>

<vncip>192.168.1.1</vncip>

<vncport>5901</vncport>

<vncpassword>123456</vncpassword>

Error:

<status>error</status>

<statusmsg>ERROR MESSAGE</statusmsg>

JSON

Success:

{

"status":"success",

"statusmsg":"Virtual server created",

"mainipaddress":"123.123.123.123",

"extraipaddress":"123.123.123.124,123.123.123.125",

"rootpassword":"UuasQS53",

"vserverid":"412",

"consoleuser":"console-P1RpHy",

"consolepassword":"UuasQS53",

"hostname":"test.com",

"virtid":"133",

"nodeid":"1"

}

Error:

{"status":"error","statusmsg":"ERROR MESSAGE"}