Edit Xen/KVM Compute Resource

To edit Xen/KVM compute resource, use the following request:

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

XML Request Example

curl -X PUT http://onapp.test/settings/hypervisors/13.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></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 account_email:API_key -H 'Accept: application/xml' -H 'Content-type: application/xml' 

JSON Request Example

curl -X PUT http://onapp.test/settings/hypervisors/13.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":"","cpu_units":"1000","segregation_os_type":"any_os"}}"hypervisor_group_id":"HV_Group_id"}}' -u account_email:API_key -H 'Accept: application/json' -H 'Content-type: application/json' 


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 number 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


  • added the following parameters:
    • segregation_os_type
    • failover_recipe_id 

v. 3.3

  • added cpu_units parameter