Edit Xen/KVM Compute Resource

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

XML Request example

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

JSON Request example

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


You can edit the following parameters:

ip_address - the compute resource IP address

label - the name of the compute resource

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.hypervisor_type - compute resource type

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 - set ID of the compute zone to attach this compute resource to it, or send the empty value to remove the compute resource from the  compute zone

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

Returns HTTP 204 response on successful deletion, or HTTP 404 when a compute resource with the ID specified is not found, or the URL requested is incorrect.


Page history

v.5.9

  • added segregation_os_type parameter
  • added failover_recipe_id parameter 

v. 3.3:

  • cpu_units