The Create VPS API allows you to create virtual private servers on your server. A Virtual Private Server is an instance of your physical server that appears to the user as a dedicated server. Virtualizor supports OpenVZ, Xen PV, Xen HVM, XenServer, Linux KVM, LXC, Proxmox, Virtuozzo and OpenVZ 7 virtualization. You can specify all the configurations like the virtualization type, size, RAM etc that you want for the VPS.
The storage uuid needed for VPS creation can be obtained from the List Storage API.
The API response will contain "vpsinfo" as the details of the newly created VPS on success.
HTTP Request
https://hostname:4085/index.php?act=addvs
Parameters
Name | Method | Value | Description | Required |
---|---|---|---|---|
act | GET | addvs | The action specified to retrieve data after adding the vps | Yes |
virt | POST | text | The Virtualization Technology has to be specified here, refer below table for valid values | Yes |
node_select | POST | Int | In order to select slave server or when you to want auto-select the server. | Yes |
user_email | POST | text | Add User Email | Yes |
user_pass | POST | text | Add a password | Yes |
hostname | POST | text | The hostname the VPS | Yes |
rootpass | POST | text | The root password for the VPS | Yes |
slave_server | POST | Int | The slave server ID on which vps is to be created | No |
server_group | POST | Int | Server Group ID. If provided VM will be created among any server which belong to this server group. NOTE: If slave_server is provided, server_group will be ignored. | No |
osid | POST | Int | The ID of the Operating System | Yes |
ips | POST | array | The IP Address(s) for the VPS | Yes |
space | POST | array | The disk space for the VPS. In case of Multiple Disk you can specify the array as given in the example. Otherwise just value for single disk VPS is enough you can find st_uuid and stid on List storage page | Yes |
bus_driver | POST | text | Provide bus driver for proxmox QEMU/KVM | Required for Proxmox KVM |
bus_driver_num | POST | Int | Provide bus driver numbers ranging from 0-5 | Required for Proxmox KVM |
ram | POST | Int | The ram value in MBs for the VPS | Yes |
bandwidth | POST | Int | The network bandwidth for the VPS: 0 (Zero) for unlimited | Yes |
speed_cap_up | POST | Int | The capped upload speed, (you will need to provide bandwidth for capped feature to work), Also the Capped speed should be less than or equal to Network/Upload (If provided) speed. | |
speed_cap_down | POST | Int | The capped download speed, (you will need to provide bandwidth for capped feature to work), Also the Capped speed should be less than or equal to Network/Upload (If provided) speed. | |
cores | POST | Int | The number of cores allotted to the VPS | Yes |
plid | POST | Int | The plan ID for the VPS | No |
network_speed | POST | Int | The network_speed for the VPS in KB/s | No |
mgs | POST | Int | Media groups IDs | No |
priority | POST | Int | The IO priority for the VPS (Only for Virtuozzo OpenVZ and Virtuozzo KVM) | No |
cpu | POST | Int | The CPU weight for the VPS | No |
burst | POST | Int | The burst RAM for the VPS (Only for OpenVZ and Proxmox) | No |
cpu_percent | POST | Int | The CPU Percent time for the VPS (Only for OpenVZ and Proxmox) | No |
iso | POST | text | The ISO name | No |
stid | POST | Int | Storage ID on which the VPS is to be created. (Not needed if using Primary storage) | No |
vnc | POST | Int | Flag to enable vnc(0 or 1) (Only for KVM and Xen) | No |
vncpass | POST | text | The vnc password (Only for KVM and Xen) | No |
swapram | POST | Int | The amount of SWAP for the VPS (Only for KVM, Xen, Proxmox KVM and XCP) | No |
shadow | POST | Int | The amount of shadow memory for the VPS (Only Xen HVM) | No |
hvm | POST | Int | Flag to enable hvm(0 or 1)(Only for Xen HVM) | No |
boot | POST | text | The boot order (dca or cda) (Only for KVM and Xen HVM) | No |
num_ips | POST | Int | The Number of Ipv4 Address given to the vps | No |
num_ips6 | POST | Int | The Number of Ipv6 Address given to the vps | No |
num_ips6_subnet | POST | Int | The Number of IPV6 Subnet to be assigned to the vps | No |
noemail | POST | Int | Flag to disable email notification to VPS client only (0 or 1) | No |
fname | POST | text | Add user first name | No |
lname | POST | text | Add user last name | No |
uid | POST | Int | Selects a unique ID of the user to which the vps will be assigned | No |
dnsplid | POST | Int | Add a dns Plan to the vps. User which has selected dns plan only can use this | No |
addvps | POST | 1 | If set the vps will be created | No |
band_suspend | POST | 1/0 | Flag to suspend the VPS network | No |
tuntap | POST | Int | Flag to enable tuntap (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
ppp | POST | Int | Flag to enable ppp (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
fuse | POST | Int | Flag to enable fuse (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
ipip | POST | Int | Flag to enable ipip (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
ipgre | POST | Int | Flag to enable ipgre (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
nfs | POST | Int | Flag to enable nfs (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
quotaugidlimit | POST | Int | Provide quotaugidlimit (Only for OpenVZ/OpenVZ7) | No |
iolimit | POST | Int | Provide iolimit (Only for OpenVZ/OpenVZ7) | No |
iopslimit | POST | Int | Provide iopslimit (Only for OpenVZ/OpenVZ7) | No |
vif_type | POST | text | The VIF type (netfront or ioemu) (Only for KVM and Xen HVM) | No |
nic_type | POST | text | The NIC type (default or e1000) (Only for KVM and Xen) | No |
ips_int | POST | array | Set the internal ip for the vps | No |
virtio | POST | 1/0 | Flag to enable VIRTIO (0 or 1)(Only for KVM) | No |
kvm_cache | POST | text | The type disk-cache mechanism can be writeback, writethrough, directsync or default (Only for KVM and Proxmox KVM) | No |
upload_speed | POST | Int | This will set the upload speed of the vps in KB/s | No |
dns | POST | array | This will assign the dns nameserver that the vps should use | No |
control_panel | POST | text | This option will install selected web control panel in the VPS types of control panel are cpanel/webuzo/plesk/webmin/inteworx/ispconfig/cwp/vesta | No |
recipe | POST | Int | This will execute the selected recipe after creation of VPS | No |
cpupin | POST | array | Pin the particular CPU Cores to this VPS (Only for KVM, Virtuozzo KVM,Virtuozzo OpenVz, XEN) | No |
cpu_mode | POST | text | Refer Values from below table | No |
topology_sockets | POST | Int | Specify the number of CPU Sockets to be assigned to the VPS (Only for KVM, Proxmox KVM, XCP) | No |
topology_cores | POST | Int | Specify the number of CPU cores to be assigned to the VPS (Only for KVM, Proxmox KVM, XCP) | No |
topology_threads | POST | Int | Specify the number of CPU Threads to be assigned to the VPS (Only for KVM, Proxmox KVM, XCP) | No |
io_mode | POST | text | Sets the I/O policy for the VPS can be native/threads (Only for KVM) | No |
kvm_vga | POST | 1/0 | Enables VGA for the VPS (Only for KVM) | No |
acceleration | POST | 1/0 | If VGA is enabled then this option will enable 2D and 3D acceleration will be for the VPS | No |
disable_ebtables | POST | 1/0 | Disable ebtables for the VPS | No |
rdp | POST | 1/0 | Enable Remote Desktop Connection (For Windows VPS) | No |
vnc_keymap | POST | text | Allows to select keymap can be 'en-us', 'de-ch', 'ar', 'da', 'et', 'fo', 'fr-be', 'fr-ch', 'hu', 'it', 'lt', 'mk', 'nl', 'no', 'pt', 'ru', 'sv', 'tr', 'de', 'en-gb', 'es', 'fi', 'fr', 'fr-ca', 'hr', 'is', 'ja', 'lv', 'nl-be', 'pl', 'pt-br', 'sl', 'th' | No |
osreinstall_limit | POST | Int | If you want to limit the number of OS re-installs per month.Eg. 0 - is unlimited | No |
admin_managed | POST | 1/0 | If checked, VPS can not be managed from Enduser panel | No |
disable_nw_config | POST | 1/0 | If checked, Virtualizor will not configure/re-write network when a VPS is rebooted. However, during creation of the VPS, the network file will be written | No |
total_iops_sec | POST | Int | Provide total I/O per sec in MBs (For KVM only) | No |
read_bytes_sec | POST | Int | Provide read mega per sec in MBs (For KVM only) | No |
write_bytes_sec | POST | Int | Provide write mega per sec in MBs (For KVM only) | No |
ha | POST | 1/0 | Provide 1 to enable HA in VM, NOTE : HA will be enabled in VM only if the VM is created in HA enabled server group | No |
os_type | POST | text | Setting the proper os_type allows Proxmox VE to optimize some low level parameters, Please refer following table for valid os_type values (For Proxmox kvm only) | No |
rtc | POST | 1/0 | If rtc is is set to1 then it is enabled else it is disabled (For Proxmox kvm only) | No |
unprivileged | POST | 1/0 | If set than container will be created as an unprivileged container Note: once container is created it cannot be changed to privileged and vice versa (For Proxmox lxc only) | No |
kvm_vga | POST | Int | Assign vga vram value in MB. By default virtualizor will assign 8MB. (For KVM only) | No |
ssd_emulation | POST | Int | Provide 1 for to enable ssd_emulation. (For KVM and Promox kvm only) | No |
disable_password | POST | Int | If enabled then password authentication will be restricted for SSH. | No |
discard | POST | Int | Provde 1 to enable disacrd option (Only for Promox KVM) | No |
ssh_options | POST | Int | Provide one of these ssh_options: add_ssh_keys, generate_keys, use_ssh_keys, we have provided detailed information about these options below | No |
sshkey | POST | Int | Provide public ssh key | No |
private_key | POST | Int | Provide private key (compulsory if generate_keys is passed in ssh_options) | No |
bios | POST | string | provide bios seabios/uefi Default is seabios (KVM only) | No |
enable_tpm | POST | int | TPM for UEFI pass 1 if enabled (KVM only) | No |
bootord | POST | string | Comma seperated disk and cdrom (KVM only) | No |
disable_guest_agent | POST | int | 1/0 (if not passed then by default it will be 0) (Since 3.1.9.1) | No |
demo | POST | int | 1/0 | No |
demo_date | POST | string | The date on which the demo action should be triggered. The required format is (DD/MM/YYYY). Required if the demo parameter is passed. | No / Required if demo is passed |
demo_time | POST | string | Time for action to be performed on a defined date. The required format is (HH:MM:SS). Required if the demo parameter is passed. | No / Required if demo is passed |
demo_action | POST | int | Action to be taken when Demo expires. 0 = It will delete the VM (Default) 1 = It will suspend the VM | No |
Parameters
Name | Method | Value | Description | Required |
---|---|---|---|---|
act | GET | addvs | The action specified to retrieve data after adding the vps | Yes |
virt | POST | text | The Virtualization Technology has to be specified here, refer below table for valid values | Yes |
node_select | POST | Int | In order to select slave server or when you to want auto-select the server. | Yes |
user_email | POST | text | Add User Email | Yes |
user_pass | POST | text | Add a password | Yes |
hostname | POST | text | The hostname the VPS | Yes |
rootpass | POST | text | The root password for the VPS | Yes |
slave_server | POST | Int | The slave server ID on which vps is to be created | No |
server_group | POST | Int | Server Group ID. If provided VM will be created among any server which belong to this server group. NOTE: If slave_server is provided, server_group will be ignored. | No |
osid | POST | Int | The ID of the Operating System | Yes |
ips | POST | array | The IP Address(s) for the VPS | Yes |
space | POST | array | The disk space for the VPS. In case of Multiple Disk you can specify the array as given in the example. Otherwise just value for single disk VPS is enough you can find st_uuid and stid on List storage page | Yes |
bus_driver | POST | text | Provide bus driver for proxmox QEMU/KVM | Required for Proxmox KVM |
bus_driver_num | POST | Int | Provide bus driver numbers ranging from 0-5 | Required for Proxmox KVM |
ram | POST | Int | The ram value in MBs for the VPS | Yes |
bandwidth | POST | Int | The network bandwidth for the VPS: 0 (Zero) for unlimited | Yes |
speed_cap_up | POST | Int | The capped upload speed, (you will need to provide bandwidth for capped feature to work), Also the Capped speed should be less than or equal to Network/Upload (If provided) speed. | |
speed_cap_down | POST | Int | The capped download speed, (you will need to provide bandwidth for capped feature to work), Also the Capped speed should be less than or equal to Network/Upload (If provided) speed. | |
cores | POST | Int | The number of cores allotted to the VPS | Yes |
plid | POST | Int | The plan ID for the VPS | No |
network_speed | POST | Int | The network_speed for the VPS in KB/s | No |
mgs | POST | Int | Media groups IDs | No |
priority | POST | Int | The IO priority for the VPS (Only for Virtuozzo OpenVZ and Virtuozzo KVM) | No |
cpu | POST | Int | The CPU weight for the VPS | No |
burst | POST | Int | The burst RAM for the VPS (Only for OpenVZ and Proxmox) | No |
cpu_percent | POST | Int | The CPU Percent time for the VPS (Only for OpenVZ and Proxmox) | No |
iso | POST | text | The ISO name | No |
stid | POST | Int | Storage ID on which the VPS is to be created. (Not needed if using Primary storage) | No |
vnc | POST | Int | Flag to enable vnc(0 or 1) (Only for KVM and Xen) | No |
vncpass | POST | text | The vnc password (Only for KVM and Xen) | No |
swapram | POST | Int | The amount of SWAP for the VPS (Only for KVM, Xen, Proxmox KVM and XCP) | No |
shadow | POST | Int | The amount of shadow memory for the VPS (Only Xen HVM) | No |
hvm | POST | Int | Flag to enable hvm(0 or 1)(Only for Xen HVM) | No |
boot | POST | text | The boot order (dca or cda) (Only for KVM and Xen HVM) | No |
num_ips | POST | Int | The Number of Ipv4 Address given to the vps | No |
num_ips6 | POST | Int | The Number of Ipv6 Address given to the vps | No |
num_ips6_subnet | POST | Int | The Number of IPV6 Subnet to be assigned to the vps | No |
noemail | POST | Int | Flag to disable email notification to VPS client only (0 or 1) | No |
fname | POST | text | Add user first name | No |
lname | POST | text | Add user last name | No |
uid | POST | Int | Selects a unique ID of the user to which the vps will be assigned | No |
dnsplid | POST | Int | Add a dns Plan to the vps. User which has selected dns plan only can use this | No |
addvps | POST | 1 | If set the vps will be created | No |
band_suspend | POST | 1/0 | Flag to suspend the VPS network | No |
tuntap | POST | Int | Flag to enable tuntap (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
ppp | POST | Int | Flag to enable ppp (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
fuse | POST | Int | Flag to enable fuse (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
ipip | POST | Int | Flag to enable ipip (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
ipgre | POST | Int | Flag to enable ipgre (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
nfs | POST | Int | Flag to enable nfs (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
quotaugidlimit | POST | Int | Provide quotaugidlimit (Only for OpenVZ/OpenVZ7) | No |
iolimit | POST | Int | Provide iolimit (Only for OpenVZ/OpenVZ7) | No |
iopslimit | POST | Int | Provide iopslimit (Only for OpenVZ/OpenVZ7) | No |
vif_type | POST | text | The VIF type (netfront or ioemu) (Only for KVM and Xen HVM) | No |
nic_type | POST | text | The NIC type (default or e1000) (Only for KVM and Xen) | No |
ips_int | POST | array | Set the internal ip for the vps | No |
virtio | POST | 1/0 | Flag to enable VIRTIO (0 or 1)(Only for KVM) | No |
kvm_cache | POST | text | The type disk-cache mechanism can be writeback, writethrough, directsync or default (Only for KVM and Proxmox KVM) | No |
upload_speed | POST | Int | This will set the upload speed of the vps in KB/s | No |
dns | POST | array | This will assign the dns nameserver that the vps should use | No |
control_panel | POST | text | This option will install selected web control panel in the VPS types of control panel are cpanel/webuzo/plesk/webmin/inteworx/ispconfig/cwp/vesta | No |
recipe | POST | Int | This will execute the selected recipe after creation of VPS | No |
cpupin | POST | array | Pin the particular CPU Cores to this VPS (Only for KVM, Virtuozzo KVM,Virtuozzo OpenVz, XEN) | No |
cpu_mode | POST | text | Refer Values from below table | No |
topology_sockets | POST | Int | Specify the number of CPU Sockets to be assigned to the VPS (Only for KVM, Proxmox KVM, XCP) | No |
topology_cores | POST | Int | Specify the number of CPU cores to be assigned to the VPS (Only for KVM, Proxmox KVM, XCP) | No |
topology_threads | POST | Int | Specify the number of CPU Threads to be assigned to the VPS (Only for KVM, Proxmox KVM, XCP) | No |
io_mode | POST | text | Sets the I/O policy for the VPS can be native/threads (Only for KVM) | No |
kvm_vga | POST | 1/0 | Enables VGA for the VPS (Only for KVM) | No |
acceleration | POST | 1/0 | If VGA is enabled then this option will enable 2D and 3D acceleration will be for the VPS | No |
disable_ebtables | POST | 1/0 | Disable ebtables for the VPS | No |
rdp | POST | 1/0 | Enable Remote Desktop Connection (For Windows VPS) | No |
vnc_keymap | POST | text | Allows to select keymap can be 'en-us', 'de-ch', 'ar', 'da', 'et', 'fo', 'fr-be', 'fr-ch', 'hu', 'it', 'lt', 'mk', 'nl', 'no', 'pt', 'ru', 'sv', 'tr', 'de', 'en-gb', 'es', 'fi', 'fr', 'fr-ca', 'hr', 'is', 'ja', 'lv', 'nl-be', 'pl', 'pt-br', 'sl', 'th' | No |
osreinstall_limit | POST | Int | If you want to limit the number of OS re-installs per month.Eg. 0 - is unlimited | No |
admin_managed | POST | 1/0 | If checked, VPS can not be managed from Enduser panel | No |
disable_nw_config | POST | 1/0 | If checked, Virtualizor will not configure/re-write network when a VPS is rebooted. However, during creation of the VPS, the network file will be written | No |
total_iops_sec | POST | Int | Provide total I/O per sec in MBs (For KVM only) | No |
read_bytes_sec | POST | Int | Provide read mega per sec in MBs (For KVM only) | No |
write_bytes_sec | POST | Int | Provide write mega per sec in MBs (For KVM only) | No |
ha | POST | 1/0 | Provide 1 to enable HA in VM, NOTE : HA will be enabled in VM only if the VM is created in HA enabled server group | No |
os_type | POST | text | Setting the proper os_type allows Proxmox VE to optimize some low level parameters, Please refer following table for valid os_type values (For Proxmox kvm only) | No |
rtc | POST | 1/0 | If rtc is is set to1 then it is enabled else it is disabled (For Proxmox kvm only) | No |
unprivileged | POST | 1/0 | If set than container will be created as an unprivileged container Note: once container is created it cannot be changed to privileged and vice versa (For Proxmox lxc only) | No |
kvm_vga | POST | Int | Assign vga vram value in MB. By default virtualizor will assign 8MB. (For KVM only) | No |
ssd_emulation | POST | Int | Provide 1 for to enable ssd_emulation. (For KVM and Promox kvm only) | No |
disable_password | POST | Int | If enabled then password authentication will be restricted for SSH. | No |
discard | POST | Int | Provde 1 to enable disacrd option (Only for Promox KVM) | No |
ssh_options | POST | Int | Provide one of these ssh_options: add_ssh_keys, generate_keys, use_ssh_keys, we have provided detailed information about these options below | No |
sshkey | POST | Int | Provide public ssh key | No |
private_key | POST | Int | Provide private key (compulsory if generate_keys is passed in ssh_options) | No |
bios | POST | string | provide bios seabios/uefi Default is seabios (KVM only) | No |
enable_tpm | POST | int | TPM for UEFI pass 1 if enabled (KVM only) | No |
bootord | POST | string | Comma seperated disk and cdrom (KVM only) | No |
disable_guest_agent | POST | int | 1/0 (if not passed then by default it will be 0) (Since 3.1.9.1) | No |
demo | POST | int | 1/0 | No |
demo_date | POST | string | The date on which the demo action should be triggered. The required format is (DD/MM/YYYY). Required if the demo parameter is passed. | No / Required if demo is passed |
demo_time | POST | string | Time for action to be performed on a defined date. The required format is (HH:MM:SS). Required if the demo parameter is passed. | No / Required if demo is passed |
demo_action | POST | int | 1/0 (if not passed then by default it will be 0) (Since 3.1.9.1) | No |
Parameters
Name | Method | Value | Description | Required |
---|---|---|---|---|
act | GET | addvs | The action specified to retrieve data after adding the vps | Yes |
virt | POST | text | The Virtualization Technology has to be specified here, refer below table for valid values | Yes |
node_select | POST | Int | In order to select slave server or when you to want auto-select the server. | Yes |
user_email | POST | text | Add User Email | Yes |
user_pass | POST | text | Add a password | Yes |
hostname | POST | text | The hostname the VPS | Yes |
rootpass | POST | text | The root password for the VPS | Yes |
slave_server | POST | Int | The slave server ID on which vps is to be created | No |
server_group | POST | Int | Server Group ID. If provided VM will be created among any server which belong to this server group. NOTE: If slave_server is provided, server_group will be ignored. | No |
osid | POST | Int | The ID of the Operating System | Yes |
ips | POST | array | The IP Address(s) for the VPS | Yes |
space | POST | array | The disk space for the VPS. In case of Multiple Disk you can specify the array as given in the example. Otherwise just value for single disk VPS is enough you can find st_uuid and stid on List storage page | Yes |
bus_driver | POST | text | Provide bus driver for proxmox QEMU/KVM | Required for Proxmox KVM |
bus_driver_num | POST | Int | Provide bus driver numbers ranging from 0-5 | Required for Proxmox KVM |
ram | POST | Int | The ram value in MBs for the VPS | Yes |
bandwidth | POST | Int | The network bandwidth for the VPS: 0 (Zero) for unlimited | Yes |
speed_cap_up | POST | Int | The capped upload speed, (you will need to provide bandwidth for capped feature to work), Also the Capped speed should be less than or equal to Network/Upload (If provided) speed. | |
speed_cap_down | POST | Int | The capped download speed, (you will need to provide bandwidth for capped feature to work), Also the Capped speed should be less than or equal to Network/Upload (If provided) speed. | |
cores | POST | Int | The number of cores allotted to the VPS | Yes |
plid | POST | Int | The plan ID for the VPS | No |
network_speed | POST | Int | The network_speed for the VPS in KB/s | No |
mgs | POST | Int | Media groups IDs | No |
priority | POST | Int | The IO priority for the VPS (Only for Virtuozzo OpenVZ and Virtuozzo KVM) | No |
cpu | POST | Int | The CPU weight for the VPS | No |
burst | POST | Int | The burst RAM for the VPS (Only for OpenVZ and Proxmox) | No |
cpu_percent | POST | Int | The CPU Percent time for the VPS (Only for OpenVZ and Proxmox) | No |
iso | POST | text | The ISO name | No |
stid | POST | Int | Storage ID on which the VPS is to be created. (Not needed if using Primary storage) | No |
vnc | POST | Int | Flag to enable vnc(0 or 1) (Only for KVM and Xen) | No |
vncpass | POST | text | The vnc password (Only for KVM and Xen) | No |
swapram | POST | Int | The amount of SWAP for the VPS (Only for KVM, Xen, Proxmox KVM and XCP) | No |
shadow | POST | Int | The amount of shadow memory for the VPS (Only Xen HVM) | No |
hvm | POST | Int | Flag to enable hvm(0 or 1)(Only for Xen HVM) | No |
boot | POST | text | The boot order (dca or cda) (Only for KVM and Xen HVM) | No |
num_ips | POST | Int | The Number of Ipv4 Address given to the vps | No |
num_ips6 | POST | Int | The Number of Ipv6 Address given to the vps | No |
num_ips6_subnet | POST | Int | The Number of IPV6 Subnet to be assigned to the vps | No |
noemail | POST | Int | Flag to disable email notification to VPS client only (0 or 1) | No |
fname | POST | text | Add user first name | No |
lname | POST | text | Add user last name | No |
uid | POST | Int | Selects a unique ID of the user to which the vps will be assigned | No |
dnsplid | POST | Int | Add a dns Plan to the vps. User which has selected dns plan only can use this | No |
addvps | POST | 1 | If set the vps will be created | No |
band_suspend | POST | 1/0 | Flag to suspend the VPS network | No |
tuntap | POST | Int | Flag to enable tuntap (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
ppp | POST | Int | Flag to enable ppp (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
fuse | POST | Int | Flag to enable fuse (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
ipip | POST | Int | Flag to enable ipip (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
ipgre | POST | Int | Flag to enable ipgre (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
nfs | POST | Int | Flag to enable nfs (0 or 1) (Only for OpenVZ/OpenVZ7) | No |
quotaugidlimit | POST | Int | Provide quotaugidlimit (Only for OpenVZ/OpenVZ7) | No |
iolimit | POST | Int | Provide iolimit (Only for OpenVZ/OpenVZ7) | No |
iopslimit | POST | Int | Provide iopslimit (Only for OpenVZ/OpenVZ7) | No |
vif_type | POST | text | The VIF type (netfront or ioemu) (Only for KVM and Xen HVM) | No |
nic_type | POST | text | The NIC type (default or e1000) (Only for KVM and Xen) | No |
ips_int | POST | array | Set the internal ip for the vps | No |
virtio | POST | 1/0 | Flag to enable VIRTIO (0 or 1)(Only for KVM) | No |
kvm_cache | POST | text | The type disk-cache mechanism can be writeback, writethrough, directsync or default (Only for KVM and Proxmox KVM) | No |
upload_speed | POST | Int | This will set the upload speed of the vps in KB/s | No |
dns | POST | array | This will assign the dns nameserver that the vps should use | No |
control_panel | POST | text | This option will install selected web control panel in the VPS types of control panel are cpanel/webuzo/plesk/webmin/inteworx/ispconfig/cwp/vesta | No |
recipe | POST | Int | This will execute the selected recipe after creation of VPS | No |
cpupin | POST | array | Pin the particular CPU Cores to this VPS (Only for KVM, Virtuozzo KVM,Virtuozzo OpenVz, XEN) | No |
cpu_mode | POST | text | Refer Values from below table | No |
topology_sockets | POST | Int | Specify the number of CPU Sockets to be assigned to the VPS (Only for KVM, Proxmox KVM, XCP) | No |
topology_cores | POST | Int | Specify the number of CPU cores to be assigned to the VPS (Only for KVM, Proxmox KVM, XCP) | No |
topology_threads | POST | Int | Specify the number of CPU Threads to be assigned to the VPS (Only for KVM, Proxmox KVM, XCP) | No |
io_mode | POST | text | Sets the I/O policy for the VPS can be native/threads (Only for KVM) | No |
kvm_vga | POST | 1/0 | Enables VGA for the VPS (Only for KVM) | No |
acceleration | POST | 1/0 | If VGA is enabled then this option will enable 2D and 3D acceleration will be for the VPS | No |
disable_ebtables | POST | 1/0 | Disable ebtables for the VPS | No |
rdp | POST | 1/0 | Enable Remote Desktop Connection (For Windows VPS) | No |
vnc_keymap | POST | text | Allows to select keymap can be 'en-us', 'de-ch', 'ar', 'da', 'et', 'fo', 'fr-be', 'fr-ch', 'hu', 'it', 'lt', 'mk', 'nl', 'no', 'pt', 'ru', 'sv', 'tr', 'de', 'en-gb', 'es', 'fi', 'fr', 'fr-ca', 'hr', 'is', 'ja', 'lv', 'nl-be', 'pl', 'pt-br', 'sl', 'th' | No |
osreinstall_limit | POST | Int | If you want to limit the number of OS re-installs per month.Eg. 0 - is unlimited | No |
admin_managed | POST | 1/0 | If checked, VPS can not be managed from Enduser panel | No |
disable_nw_config | POST | 1/0 | If checked, Virtualizor will not configure/re-write network when a VPS is rebooted. However, during creation of the VPS, the network file will be written | No |
total_iops_sec | POST | Int | Provide total I/O per sec in MBs (For KVM only) | No |
read_bytes_sec | POST | Int | Provide read mega per sec in MBs (For KVM only) | No |
write_bytes_sec | POST | Int | Provide write mega per sec in MBs (For KVM only) | No |
ha | POST | 1/0 | Provide 1 to enable HA in VM, NOTE : HA will be enabled in VM only if the VM is created in HA enabled server group | No |
os_type | POST | text | Setting the proper os_type allows Proxmox VE to optimize some low level parameters, Please refer following table for valid os_type values (For Proxmox kvm only) | No |
rtc | POST | 1/0 | If rtc is is set to1 then it is enabled else it is disabled (For Proxmox kvm only) | No |
unprivileged | POST | 1/0 | If set than container will be created as an unprivileged container Note: once container is created it cannot be changed to privileged and vice versa (For Proxmox lxc only) | No |
kvm_vga | POST | Int | Assign vga vram value in MB. By default virtualizor will assign 8MB. (For KVM only) | No |
ssd_emulation | POST | Int | Provide 1 for to enable ssd_emulation. (For KVM and Promox kvm only) | No |
disable_password | POST | Int | If enabled then password authentication will be restricted for SSH. | No |
discard | POST | Int | Provde 1 to enable disacrd option (Only for Promox KVM) | No |
ssh_options | POST | Int | Provide one of these ssh_options: add_ssh_keys, generate_keys, use_ssh_keys, we have provided detailed information about these options below | No |
sshkey | POST | Int | Provide public ssh key | No |
private_key | POST | Int | Provide private key (compulsory if generate_keys is passed in ssh_options) | No |
bios | POST | string | provide bios seabios/uefi Default is seabios (KVM only) | No |
enable_tpm | POST | int | TPM for UEFI pass 1 if enabled (KVM only) | No |
bootord | POST | string | Comma seperated disk and cdrom (KVM only) | No |
disable_guest_agent | POST | int | 1/0 (if not passed then by default it will be 0) (Since 3.1.9.1) | No |
demo | POST | int | 1/0 | No |
demo_date | POST | string | The date on which the demo action should be triggered. The required format is (DD/MM/YYYY). Required if the demo parameter is passed. | No / Required if demo is passed |
demo_time | POST | string | Time for action to be performed on a defined date. The required format is (HH:MM:SS). Required if the demo parameter is passed. | No / Required if demo is passed |
demo_action | POST | int | 1/0 (if not passed then by default it will be 0) (Since 3.1.9.1) | No |
Vertical scaling parameters (Since V3.1.3)
- Vertical scaling is supported on KVM based virtualization only.
- QEMU version should be greater than or equal to 1.5, To check QEMU Version run "/usr/bin/virsh version"
- Vertical scaling is currently not supported on Windows VPS
Name | Method | Value | Description | Required |
---|---|---|---|---|
enable_ver_scaling | Post | 1/0 | Pass 1 to enable vertical scaling, If you have already enabled scaling in master settings then no need to pass it | No |
ver_max_ram | Post | int (MB) | To set the maximum value for the VM. If provided then it will override the global setting value in master settings. |
No |
ver_ram_threshold | Post | int (%) | To set the threshold to increase the RAM by value provided. If provided then it will override the global setting value in master settings. |
No |
ver_ram_inc_by | Post | int (GB) | To increase the RAM after the threshold matches the value. If provided then it will override the global setting value in master settings. |
No |
ver_max_cpu | Post | int (Cores) | To set the maximum value for the Cores. If provided then it will override the global setting value in master settings. |
No |
ver_cpu_threshold |
Post | int (%) | To set the threshold to increase the cores by value provided. If provided then it will override the global setting value in master settings. | No |
ver_cpu_inc_by |
Post | int (Core) | To increase the Cores after the threshold matches the value. If provided then it will override the global setting value in master settings. | No |
ssh options
There are three types of ssh_options which are described below:
1. add_ssh_keys : Pass your own public ssh key in post to add that ssh key in your vps.
$post['sshkey'] = 'PUBLIC_KEY';
2. generate_keys : If you want to create new pair of keys then you will first need to generate using the following link:
https://www.virtualizor.com/docs/admin-api/generate-keys/
Once you have made the pair you will need to pass it to the ADDVS calls using following variables :
$post['sshkey'] = 'PUBLIC_KEY';
$post['private_key '] = 'PRIVATE_KEY';
3. use_ssh_keys :If you want to use existing key then first you will need to get list of sshkey using the following link:
https://www.virtualizor.com/docs/admin-api/list-ssh-keys/
Once you have made the pair you will need to pass it to the ADDVS calls using following variables :
$post[existing_key'][] = 'PUBLIC_KEY 1';
$post['existing_key '][] = 'PUBLIC_KEY 2';
Valid os_type values (For Proxmox kvm only)
Values | Description |
other | unspecified OS / Default |
wxp | Microsoft Windows XP |
w2k | Microsoft Windows 2000 |
w2k3 | Microsoft Windows 2003 |
w2k8 | Microsoft Windows 2008 |
wvista | Microsoft Windows Vista |
win7 | Microsoft Windows 7 |
win8 | Microsoft Windows 8/2012/2012r2 |
win10 | Microsoft Windows 10/2016 |
l24 | Linux 2.4 Kernel |
l26 | Linux 2.6 - 5.X Kernel |
solaris | Solaris/OpenSolaris/OpenIndiania kernel |
CPU Mode values for Proxmox KVM
( host-model | host-passthrough | 486 | athlon | pentium | pentium2 | pentium3 | coreduo | core2duo | kvm32 | qemu32 | qemu64 | phenom | Conroe | Penryn | Nehalem | SandyBridge | IvyBridge | Haswell | Broadwell | Opteron_G1 | Opteron_G2 | Opteron_G3 | Opteron_G4 | Opteron_G5 ) |
Sample Code For providing disk space in Proxmox KVM
<?php
$post['space'] = array(0=>array(
'size' => 2,
'st_uuid'=>'ngavdbegidnbme2d',
'bus_driver' => 'virtio',
'bus_driver_num' => 0),
1=>array(
'size'=>2,
'st_uuid'=>'ngavdbegidnbme2d',
'bus_driver' => 'virtio',
'bus_driver_num' => 1));
?>
Sample Code
<?php
require_once('/usr/local/virtualizor/sdk/admin.php');
$key = 'your_api_key';
$pass = 'your_api_pass';
$ip = 'your_server_ip';
$admin = new Virtualizor_Admin_API($ip, $key, $pass);
$post = array();
$post['serid'] = 0;
$post['slave_server'] = 1; // Pass the slave server ID if you want to create VPS on the Slave Server
$post['virt'] = 'kvm';
$post['uid'] = 0;
$post['user_email'] = 'test@test.com';
$post['user_pass'] = 'test123';
$post['fname'] = '';
$post['lname'] = '';
$post['plid'] = 0;
$post['osid'] = 88;
$post['hostname'] = 'test12345.com';
$post['rootpass'] = 'test123';
$post['ips'] = array('192.168.111.49');
$post['num_ips6'] = 0;
$post['num_ips6_subnet'] = 0;
$post['stid'] = 1;
$post['space'] = array(0=>array(
'size' => 2,
'st_uuid'=>'ngavdbegidnbme2d'),
1=>array(
'size'=>2,
'st_uuid'=>'ngavdbegidnbme2d')); //For VPS with Multi-Disk
$post['ram'] = 1024;
$post['swapram'] = 0;
$post['bandwidth'] = 0;
$post['network_speed'] = 0;
$post['cpu'] = 1000;
$post['cores'] = 4;
$post['cpu_percent'] = 100.00;
$post['vnc'] = 1;
$post['vncpass'] = 'test123';
$post['kvm_cache'] = 0;
$post['io_mode'] = 0;
$post['vnc_keymap'] = 'en-us';
$post['nic_type'] = 'default';
$post['osreinstall_limit'] = 0;
$post['speed_cap_up'] = 64000;
// kb
$post['speed_cap_down'] = 1280; //in kb
$post['bootord'] = 'disk1,cdrom2,cdrom1';
$output = $admin->addvs_v2($post);
print_r(json_encode($output));
?>
Output
{
"title": "Add Virtual Server",
"error": [],
"vs_info": {
"uuid": "1iq2vt2ih9ankjuo",
"pass": "test123",
"plid": 0,
"hostname": "test12345.com",
"space": 4,
"ram": 1024,
"bandwidth": 0,
"network_speed": 0,
"upload_speed": -1,
"cores": 4,
"cpupin": -1,
"uid": "58",
"io": 0,
"burst": 0,
"cpu_percent": 100,
"swap": 1024,
"acpi": 1,
"apic": 1,
"pae": 1,
"vnc": 1,
"vncport": 0,
"shadow": 0,
"virt": "kvm",
"hvm": 0,
"iso": "",
"boot": "cda",
"band_suspend": 0,
"speed_cap_down": 0,
"speed_cap_up": 0,
"tuntap": 0,
"ppp": 0,
"mac_status": 0,
"osreinstall_limit": 0,
"mg": [],
"kvm_cache": "0",
"io_mode": "0",
"vnc_keymap": "en-us",
"virtio": 0,
"numa": 0,
"cpu_mode": "",
"admin_managed": 0,
"rdp": 0,
"disable_nw_config": 0,
"topology_sockets": 0,
"topology_cores": 0,
"topology_threads": 0,
"openvz_features": "",
"bpid": 0,
"install_xentools": 0,
"sec_iso": "",
"mac": "",
"osid": 270,
"cpu": 1000,
"kvm_vga": 0,
"acceleration": 0,
"vncpass": "test123",
"disable_ebtables": 0,
"webuzo": 0,
"nic_type": "default",
"vif_type": "netfront",
"vps_name": "v1004",
"ubc": "",
"vpsid": "46",
"disks": [
{
"primary": 1,
"path": "/dev/vg/vsv1004-drhuczo0bfzvsdmi-1iq2vt2ih9ankjuo",
"st_uuid": "ngavdbegidnbme2d",
"type": "block",
"size": "2",
"size_unit": "",
"vpsid": "46",
"rescue": 0,
"target_name": "",
"format": "raw",
"disk_uuid": "drhuczo0bfzvsdmi",
"num": 0
},
{
"primary": 0,
"path": "/dev/vg/vsv1004-dzvpdxvr1ozesum0-1iq2vt2ih9ankjuo",
"st_uuid": "ngavdbegidnbme2d",
"type": "block",
"size": "2",
"size_unit": "",
"vpsid": "46",
"rescue": 0,
"target_name": "",
"format": "raw",
"disk_uuid": "dzvpdxvr1ozesum0",
"num": 1
}
],
"ips": [
"8.8.8.65"
],
"ipv6": [],
"ipv6_subnet": [],
"ips_int": []
},
"globals": {
"cookie_name": "SIMCookies7614"
}
}