Add Xen/KVM Compute Resource

POST /settings/hypervisors.xml
POST /settings/hypervisors.json

XML Request example

curl -X POST http://onapp.test/settings/hypervisors.xml -d '<hypervisor><label>HV_LABEL</label><ip_address>HV_IP</ip_address><hypervisor_type>kvm/xen</hypervisor_type><segregation_os_type>any_os</segregation_os_type><enabled>true/false</enabled><disable_failover>true</disable_failover><failover_recipe_id>get_if_config</failover_recipe_id><collect_stats>1</collect_stats><hypervisor_group_id>HV_Group_id</hypervisor_group_id><backup_ip_address>192.168.123.1</backup_ip_address><cpu_units>1000</cpu_units></hypervisor>' -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml'

JSON Request example

curl -X POST http://onapp.test/settings/hypervisors.json -d'{"hypervisor":{"label":"HV_LABEL","ip_address":"HV_IP","backup_ip_address":"192.168.123.1","hypervisor_type":"kvm/xen","segregation_os_type":"any_os","enabled":"true","disable_failover":"true/false","failover_recipe_id":"get_if_config","collect_stats":"1","hypervisor_group_id":"HV_Group_id","cpu_units":"1000"}}' -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json'

To add a new compute resource, send the following parameters: 

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 -  set true to enable a compute resource, otherwise set false

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 - set true to disable  compute resource failover, otherwise set false

failover_recipe_id - the ID of a recipe to run before the failover process

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


Page History

v.5.9:

  • added failover_recipe_id parameter
  • added segregation_os_type parameter

v. 3.3:

cpu_units