Add vCenter Compute Resources

To add a vCenter 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>vcenter_compute_resource</label><hypervisor_type>vcenter</hypervisor_type><enabled>1</enabled><collect_stats>1</collect_stats><connection_options><login>login</login><password>password</password><api_url></api_url></connection_options></hypervisor>' -u user:userpass -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":"vcenter_compute_resource","hypervisor_type":"vcenter","enabled":"1","collect_stats":"1","connection_options":{"login":"login","password":"password","api_url":""}}' -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json'


label* - the name of the compute resource

hypervisor_type* - specify compute resource type (vcenter)

enabled - set 1 to enable a compute resource (compute resources that are not enabled cannot be used to host VSs), otherwise, set 0

collect_stats - set 1 to collect statistics for this compute resource, otherwise, set 0

cpu_units - set the amount of CPU units for this compute resource

disable_failover - set true to disable compute resource failover, otherwise, set false (optional parameter)

connection_options - the array of the following vCenter connection parameters:

  • login - the vCenter login
  • password - the vCenter password
  • api_url - the vCenter IP address or hostname

Page History

v 6.0

  • removed the following parameters:
    •  ip_address  
    • backup_ip_address
  • added the api_url parameter