Virtual servers running on vCenter compute resources are managed exactly the same as normal virtual servers. The only difference is the creation process.

Currently, the use of IPv6 is not supported for vCenter virtual servers.

To create a vCenter virtual server, use the following request:

POST /virtual_machines.xml
POST /virtual_machines.json

XML Request Example

curl -i -X POST -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user_email:api_key -d '<?xml version="1.0" encoding="UTF-8"?><virtual_machine><template_id>11</template_id><infrastructure_mode>0</infrastructure_mode <label>in.api.xml</label><hostname>inapicore</hostname> <initial_root_password>in.api.core</initial_root_password><initial_root_password_confirmation>in.api.core</initial_root_password_confirmation><hypervisor_id>3</hypervisor_id>
<data_store_id>4</data_store_id><disk_size>16</disk_size><required_ip_address_assignment>true</required_ip_address_assignment><rate_limit>0</rate_limit><required_virtual_machine_build>1</required_virtual_machine_build <required_virtual_machine_startup>1</required_virtual_machine_startup></virtual_machine>' --url http://onapp.test/virtual_machines.xml 

JSON Request Example

curl -i -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -u user_email:api_key -d '{"virtual_machine {"template_id":"11","infrastructure_mode":"0","label":"in.api.core","hostname":"inapicore","initial_root_password":"in.api.core","initial_root_password_confirmation":"in.api.core","hypervisor_id":"3",
"required_ip_address_assignment":"true","rate_limit":"0","required_virtual_machine_build":"1","required_virtual_machine_startup":"1"}} --url http://onapp.test/virtual_machines.json 


template_id* - the ID of a template from which the VS should be built

infrastructure_mode - true if Infrastructure mode should be enabled for this VS; otherwise, false

label* - the label of the VS

hostname* - set the hostname for the VS

domain - specify the domain for the VS. The default value is localdomain. You can edit the default value for domain in /onapp/interface/config/on_app.yml. This parameter is not applicable for Windows virtual servers. 

initial_root_password - the root password for a VS. Optional, if none is specified, the system will provide a random password. It can consist of 6-32 characters, letters [A-Za-z], digits [0-9], dash [ - ] and lower dash [ _ ]. You can use both lower- and uppercase letters.

NOTE: It is not possible to set VS password when creating a Windows-based vCenter virtual server without running a sysprep.

initial_root_password_confirmation - confirm the root password for the VS

hypervisor_id - the ID of a compute resource where the VS will be built. Optional: if no compute resource ID is specified, the VS will be built on the compute resource with the least available RAM (but sufficient RAM for the VS).

vcenter_resource_pool_id - ID of the vCenter Resource Pool. If not specified, the default Resource Pool is used.

datacenter_id - the ID of a data center for the data store. Optional: if no data center is set, the VS will be built in any available compute zone.

memory* - the amount of RAM assigned to the VS

cpus* - the number of CPU cores assigned to the VS

(lightbulb) cpu_topology -  enable CPU topology for VS.  Set 1 to enable cpu_topology on VS, otherwise, set 0. Depends on Allow user to set CPU topology permission.

(lightbulb) cores_per_socket - the number of CPU cores per socket. Works only with cpu_topology when cpu_topology is set to 1. Depends on Allow user to set CPU topology permission.

cpu_units - the number of CPU units per core if the CPU priority is replaced with CPU units in the user bucket

data_store_group_id* - set the ID of the data store zone to which this disk is allocated

data_store_id* -  the ID of a data store for the VS primary disk 

disk_size* - set the disk space for the VS

network_group_id - the ID of the network zone. Optional parameter. 

network_id - the ID of the network. Optional parameter that can be used only if it is assigned to the network zone.

ip_net_id - the ID of the IP net from which the IP address should be assigned 

ip_range_id - the ID of the IP range from which the IP address should be assigned

ip_address - the ID of an IP address for the VS 

rate_limit - set the max port speed in Mbps or set 0 to get the maximum port speed allowed by your bucket. If this parameter is omitted or sent without value, the default port speed will be configured for the VS. The default port speed depends on the maximum port speed set in your bucket and the Max network interface port speed parameter at Control Panel > Settings > Configuration. The system identifies which of the two values (in the bucket or in the configuration) is lower and sets it as the default port speed during VS creation.

recipe_joins_attributes - an array of the recipe IDs that you want to run on the virtual server provisioning

recipe_id - the ID of the recipe that you want to assign to the VS

custom_recipe_variable - the array of custom variables with the following details:

  • enabled - true, if the variable is enabled, otherwise false
  • id - variable ID
  • name - variable name
  • value - variable value script

service_addon_ids - the array of service add-on IDs that you want to add to VS. You can assign service add-on only if they are enabled on your license. 

service_addon_id - the ID of the service add-on that you want to add to VS

(lightbulb) required_ip_address_assignment - set 1 if you want the IP address to be assigned automatically after creation. Otherwise, set 1.

required_virtual_machine_build* - set 1 to build VS automatically

required_virtual_machine_startup - set 1 to start up the VS automatically; otherwise, set 0 (the default state is 1)

licensing_server_id - the ID of a template group where the KMS server details are indicated and to which the template belongs (either directly or through the child group). This parameter is for Windows virtual machines with KMS licensing type only.

licensing_type - the type of a license: makkms, or user own license. This parameter is required for Windows virtual machines only.

licensing_key - the key of a license, required if you have selected own licensing type, and not required for MAK and KMS licensing types. This parameter is required for Windows virtual machines only.

Page History


  • added the cpu_topology, cores_per_socket, and required_ip_address_assignment parameters

v.6.4 Edge 1

  • added the vcenter_resource_pool_id parameter
  • removed the hypervisor_group_id and cluster_id parameters

v.6.3 Edge 2

  • added the infrastructure_mode parameter


  • added the following parameters:
    • ip_net_id
    • ip_range_id 
    • ip_address


  • added the following parameters:
    • datacenter_id 
    • cluster_id 
    • primary_data_store_id 


  • added the following parameters:
    • custom_variables
    • enabled
    • id
    • name
    • value