Edit vCenter Compute Resources

To edit a vCenter compute resource, use the following request:

PUT /settings/hypervisors/:hypervisor_id.xml
PUT /settings/hypervisors/:hypervisor_id.json

XML Request Example

curl -i -X PUT http://onapp.test/settings/hypervisors/:hypervisor_id.xml -d '<hypervisor><label>vcenter_compute_resource</label><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 PUT http://onapp.test/settings/hypervisors/:hypervisor_id.json -d '{"hypervisor {"label":"vcenter_compute_resource","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

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


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