Add Smart CloudBoot Compute Resource

To create a CloudBoot compute resource, use the following request:

POST /settings/assets/:asset_mac_address/hypervisors.xml
POST /settings/assets/:asset_mac_address/hypervisors.json

XML Request Example

curl -i -X POST http://onapp.test/settings/assets/00:30:48:fd:74:c6/hypervisors.xml -d
'<hypervisor><label>smart
zaza</label><pxe_ip_address_id>1248</pxe_ip_address_id><hypervisor_type>kvm</hypervisor_type><segregation_os_type>any</segregation_os_type><server_type>smart</server_type><backup_ip_address></backup_ip_address><enabled>1</enabled><collect_stats>1</collect_stats><disable_failover>1</disable_failover><format_disks>1</format_disks><passthrough_disks>0</passthrough_disks><storage><disks
type="array"><disk><scsi>DC0710130DBA80013_TAII_DC0710130DBA80013</scsi><selected>1</selected></disk></disks><nics
type="array"><nic><mac>00:30:48:fd:74:c7</mac><type>1</type></nic><nic><mac>00:1b:21:6f:3a:ff</mac><type>3</type></nic></nics><custom_pcis
type="array"><custom_pci><pci>00:00.0</pci><selected>1</selected></custom_pci></custom_pcis></storage><passthrough_custom_pcis>1</passthrough_custom_pcis><mtu>1500</mtu><storage_controller_memory_size>640</storage_controller_memory_size><disks_per_storage_controller>4</disks_per_storage_controller><allow_unsafe_assigned_interrupts>true</allow_unsafe_assigned_interrupts><custom_config></custom_config>
</hypervisor>' -u account_email:API_key -H 'Accept: application/xml' -H 'Content-type: application/xml'

JSON Request Example

curl -i -X POST http://onapp.test/settings/assets/00:30:48:fd:74:c6/hypervisors.json -d '{"hypervisor":{"label":"smart","pxe_ip_address_id":"2","hypervisor_type":"kvm",""segregation_os_type":"any","server_type":"smart","backup_ip_address":"", "enabled":"1","collect_stats":"1","disable_failover":"1","format_disks":"1", "passthrough_disks":"0","storage":{"disks":[{"scsi":"9VM51JELS_9VM51JEL","selected":"1"}],"nics":[{"mac":"00:25:90:10:62:5b","type":"1"}, {"mac":"00:1b:21:72:9d:06","type":"3"}],"custom_pcis":[{"pci":"00:00.0","selected":"1"}]},"passthrough_custom_pcis":"1","mtu":"1500","storage_controller_memory_size":"640","disks_per_storage_controller":"4",
"allow_unsafe_assigned_interrupts":"true","custom_config":""}}' -u account_email:API_key -H 'Accept:application/json' -H 'Content-type: application/json'

Where:

hypervisor - an array of compute resource details:

  • label* - the name of the compute resource
  • pxe_ip_address_id* - the ID of Cloud Boot IP address that will be used for this compute resource
  • hypervisor_type - compute resource type:
    • kvm

      You can only specify the KVM type for smart CloudBoot compute resource provisioning.


  • segregation_os_type - an operating system type (can be Any OS, Windows only or Non-Windows)
  • server_type - specify the type of servers that will be deployed on this compute resource:
    • smart - specify the smart server type to use this compute resource for smart server deployment. The server_type is virtual by default.
  • backup_ip_address - provisioning network IP address  
  • enabled - set 1 to enable this compute resource, otherwise set 0
  • collect_stats - set 1 to collect statistics for this compute resource, otherwise set 0
  • disable_failover - optional parameter. Set true to disable compute resource failover, otherwise false
  • failover_recipe_id - the ID of a recipe to run before the failover process
  • format_disks - set 1 to format compute resource's disks during creation, otherwise set 0
  • passthrough_disks - set 1 if the disks should be passed through to the storage nodes, otherwise set 0. This parameter is for Xen compute resources only.
     

storage - an array of compute resource disks' details:

  • disks - an array of compute resource disks, where:
    • scsi - SCSI inquiry product revision number
    • selected - set 1 to select a disk , otherwise set 0
  • nics - network interfaces that will be used for storage, where:
    • mac - network interface MAC address
    • type - network interface type:
      • 0 - leave the NIC unused
      • 1 - SAN subnet - select this option to use this interface for storage network. In this case, the NIC interface will be bonded with the virtual network interface of the Storage Controller Server
      • 2 - passthrough to storage - this option is available for Xen CloudBoot compute resources. The network interface will be added to the Storage Controller Server without the bond and the Storage Controller Server will have complete control over this interface
      • 3 - passthrough to Guest - this option is available for smart CloudBoot compute resources. The network interface will be added to the smart server
  • custom_pcis - an array of custom  PCI devices
    • pci - NIC PCI
    • selected - 1 if the PCI is selected, otherwise false
  • mtu - maximum transferrable unit value. You can set the frame size from 1500 to 9000 bytes.

    The maximum transportation unit (MTU) is the maximum size of a unit that can be transmitted transferred via ethernet traffic. Any data that exceed the specified MTU value will be divided into smaller units before being transferred. The utilization of jumbo frames allows to reduce increase throughput and increase CPU utilization during large-size file transfers.

  • storage_controller_memory_size - specify the storage controller memory size (minimum 640 MB)
  • disks_per_storage_controller - specify the number of disks per controller virtual server. You can specify from 1 to 4 disks. By default, the controller virtual server is created per 4 disk drives

allow_unsafe_assigned_interrupts - set true if the compute resource does not support the interrupt remapping, otherwise set false. Note: With allow_unsafe_assigned_interrupts parameter enabled, smart server is exposed to the PCI passthrough MSI trap injection.

custom_config - specify any custom commands you want to run when compute resource is booted

PLEASE NOTE: It is currently only possible to set NICs and disk information parameters via UI.

XML Output Example

<hypervisor>
  <allow_unsafe_assigned_interrupts type="boolean">true</allow_unsafe_assigned_interrupts>
  <backup type="boolean">false</backup>
  <backup_ip_address nil="true"/>
  <blocked type="boolean">true</blocked>
  <built type="boolean">false</built>
  <called_in_at nil="true"/>
  <cloud_boot_os>centos5</cloud_boot_os>
  <connection_options nil="true"/>
  <cpu_idle type="integer">0</cpu_idle>
  <cpu_mhz nil="true"/>
  <cpus nil="true"/>
  <created_at type="datetime">2013-07-25T10:24:41+03:00</created_at>
  <custom_config>iscsiadm -m discovery -t sendtargets -p 109.123.105.131\r\n\r\n/etc/init.d/iscsi restart</custom_config>
  <disable_failover type="boolean">false</disable_failover>
  <disks_per_storage_controller type="integer">4</disks_per_storage_controller>
  <distro nil="true"/>
  <enabled type="boolean">true</enabled>
  <failover_recipe_id>get_if_config</failover_recipe_id>
  <failure_count type="integer">0</failure_count>
  <format_disks type="boolean">false</format_disks>
  <free_mem type="integer">0</free_mem>
  <host nil="true"/>
  <host_id type="integer">2</host_id>
  <hypervisor_group_id nil="true"/>
  <hypervisor_type>xen</hypervisor_type>
  <id type="integer">43</id>
  <ip_address>109.123.105.133</ip_address>
  <label>CB_Virtual</label>
  <list_of_logical_volumes nil="true"/>
  <list_of_volume_groups nil="true"/>
  <list_of_zombie_domains nil="true"/>
  <locked type="boolean">false</locked>
  <mac>00:30:48:fd:74:c6</mac>
  <machine nil="true"/>
  <mem_info type="integer">0</mem_info>
  <mtu type="integer">1500</mtu>
  <online type="boolean">false</online>
  <ovs nil="true"/>
  <passthrough_disks type="boolean">false</passthrough_disks>
  <release nil="true"/>
  <segregation_os_type>any</segregation_os_type>
  <server_type>virtual</server_type>
  <spare type="boolean">false</spare>
  <storage_channel>224.3.28.1</storage_channel>
  <storage_controller_memory_size type="integer">640</storage_controller_memory_size>
  <threads_per_core nil="true"/>
  <total_mem nil="true"/>
  <total_zombie_mem nil="true"/>
  <updated_at type="datetime">2013-07-25T10:24:41+03:00</updated_at>
  <uptime nil="true"/>
  <vmware_total_cpu_cores type="integer">0</vmware_total_cpu_cores>
  <total_cpus type="integer">0</total_cpus>
  <free_memory type="integer">0</free_memory>
  <used_cpu_resources type="integer">0</used_cpu_resources>
  <total_memory type="integer">0</total_memory>
  <cpu_cores type="integer">0</cpu_cores>
  <free_disk_space nil="true"/>
  <memory_allocated_by_running_vms type="integer">0</memory_allocated_by_running_vms>
  <total_memory_allocated_by_vms type="integer">0</total_memory_allocated_by_vms>
  <storage>
    <disks type="array">
      <disk>
        <name>sda</name>
        <scsi>DC0710130DBA80013_TAII_DC0710130DBA80013</scsi>
        <selected type="boolean">true</selected>
      </disk>
    </disks>
    <nics type="array">
      <nic>
        <name>eth1</name>
        <mac>00:30:48:fd:74:c7</mac>
        <type type="integer">1</type>
      </nic>
      <nic>
        <name>eth2</name>
        <mac>00:1b:21:6f:3a:ff</mac>
        <type type="integer">0</type>
      </nic>
    </nics>
    <custom_pcis type="array">
      <custom_pci>
        <name>Intel Corporation 5520/5500/X58 I/O Hub to ESI Port [8086:3405] (rev 13)</name>
        <pci>00:00.0</pci>
        <selected type="boolean">true</selected>
      </custom_pci>
    </custom_pcis>
  </storage>
</hypervisor>


Page History

v.5.9

  • added the following parameters:
    • segregation_os_type 
    • failover_recipe_id

v3.1

  • added the following parameters:
    • allow_unsafe_assigned_interrupts
    • cloud_boot_os
    • storage_controller_memory_size
    • disks_per_storage_controller
    • custom_pcis
    • passthrough_custom_pcis
    • server_type
    • type (storage parameter)