Add VMware Compute Resource
To add a VMware compute resource, use the following request:
POST /settings/hypervisors.xml
POST /settings/hypervisors.json
XML Request Example
curl -i -X POST http://onapp.test/settings/hypervisors.xml -d '<hypervisor><label>zaza_fake_ware_xml</label><ip_address>10.10.10.12</ip_address><backup_ip_address>10.10.10.13</backup_ip_address><hypervisor_type>vmware</hypervisor_type><segregation_os_type>any</segregation_os_type><enabled>1</enabled><collect_stats>1</collect_stats><disable_failover>1</disable_failover><connection_options><login>login</login><password>password</password><cluster_name>OnApp</cluster_name><distributed_virtual_switch_name>dvSwitch</distributed_virtual_switch_name></connection_options></hypervisor>' -u account_email:API_key -H 'Accept: application/xml' -H 'Content-type: application/xml'
JSON Request Example
curl -i -X POST http://onapp.test/settings/hypervisors.json -d '{"hypervisor":{"label":"zaza_fake_ware_json", "ip_address":"10.10.10.2","backup_ip_address":"10.10.10.3","hypervisor_type":"vmware","segregation_os_type":"any","enabled":"1","collect_stats":"1", "disable_failover":"1","connection_options":{"login":"login","password":"password","cluster_name":"OnApp","distributed_virtual_switch_name":"dvSwitch"}}}' -u account_email:API_key -H 'Accept: application/json' -H 'Content-type: application/json'
Where:
ip_address* - the compute resource IP address
backup_ip_address - provisioning network IP address. Be aware, that it is not an IP address of a backup server, it is an IP address of an interface on a compute resource. It is used not to overload a management network.
label* - the name of the compute resource
hypervisor_type* - specify if this is Xen or KVM compute resource
segregation_os_type - an operating system type (can be Any OS, Windows only, or Non-Windows)
enabled - optional parameter, set True to enable a compute resource
hypervisor_group_id* - the ID of the group to which this compute resource is assigned
collect_stats - set 1 to collect statistics for this compute resource, otherwise set 0
disable_failover - optional parameter. Set true to disable compute resource failover, otherwise false
connection_options - an array of the following vCenter cluster parameters:
- login - vCenter login
- password - vCenter password
- cluster_name - vCenter cluster name
- distributed_virtual_switch_name - distributed virtual switch label
Page History
v.5.9
- added the segregation_os_type parameter