An instance offering is the count or specification of the CPU, memory, the host allocation strategy, disk bandwidth, and network bandwidth, for a VM instance.
Name | Description | Optional | Optional Value | Starting Version |
---|---|---|---|---|
uuid | The UUID. For more information, see Resource Property. | 0.6 | ||
name | The name. For more information, see Resource Property. | 0.6 | ||
description | The description. For more information, see Resource Property. | Yes | 0.6 | |
cpuNum | The number of virtual CPUs (vCPUs). For more information, see CPU Capacity. | 0.6 | ||
cpuSpeed | The vCPU speed. For more information, see CPU Capacity. | 0.6 | ||
memorySize | The memory size. Unit: byte. | 0.6 | ||
type | The instance offering type. Default type: UserVm. For more information, see Type. | Yes |
| 0.6 |
allocatorStrategy | The host allocator strategy. For more information, see Allocator Strategy. |
| 0.6 | |
state | The state. For more information, see State. |
| 0.6 | |
sortKey | 0.6 | |||
createDate | The creation date. For more information, see Resource Property. | 0.6 | ||
lastOpDate | The last operation date. For more information, see Resource Property. | 0.6 |
{ "inventories": [ { "allocatorStrategy": "LeastVmPreferredHostAllocatorStrategy", "cpuNum": 1, "cpuSpeed": 0, "createDate": "Oct 30, 2017 3:51:50 PM", "description": "", "lastOpDate": "Oct 30, 2017 4:49:03 PM", "memorySize": 1073741824, "name": "1G-1CPU", "sortKey": 0, "state": "Enabled", "type": "VirtualRouter", "uuid": "fa550cb9bdcc4fd397ae37f9ddf4c390" } ], "success": true }
Instance offerings use cpuNum and cpuSpeed to define the CPU capacity of a VM instance. The cpuNum field means the number of vCPUs that a VM instance has. The vCPU of a VM instance always has the same frequency as that of the host's physical CPU. Therefore, the cpuSpeed field here actually means the vCPU weight in hypervisors. The use and implementation of cpuSpeed vary depending on hypervisor types.
<cputune> <shares>128</shares> </cputune> shares = cpuNum * cpuSpeed
The instance offering for creating user VM instances.
The instance offering for creating virtual router (vRouter) VM instances.
Allocator strategy defines the algorithm of selecting destination hosts for creating VM instances.
DefaultHostAllocatorStrategy
l2_networks = get_parent_l2_networks(l3_networks) host_set1 = find_hosts_in_cluster_that_have_attached_to_l2_networks() check_if_backup_storage_having_image_have_attached_to_zone_of_hosts(host_set1) host_set2 = remove_hosts_not_having_state_Enabled_and_status_Connected(host_set1) host_set3 = remove_hosts_not_having_capacity_required_by_instance_offering(host_set2) primary_storage = find_Enabled_Connected_primary_storage_having_enough_capacity_for_root_volume_and_attached\ _to_clusters_of_hosts(image, host_set3) host_set4 = remove_hosts_that_cannot_access_primary_storage(host_set3) host_set5 = remove_avoided_hosts(host_set4) host_set6 = call_tag_plugin(tags, host_set5) return randomly_pick_one_host(host_set6)
LastHostPreferredAllocatorStrategy
l2_networks = get_parent_l2_networks(l3_networks) host_set1 = find_hosts_in_cluster_that_have_attached_to_l2_networks() check_if_backup_storage_having_image_have_attached_to_zone_of_hosts(host_set1) host_set2 = remove_hosts_not_having_state_Enabled_and_status_Connected(host_set1) host_set3 = remove_hosts_not_having_capacity_required_by_instance_offering(host_set2) primary_storage = find_Enabled_Connected_primary_storage_having_enough_capacity_for_root_volume_and_attached\ _to_clusters_of_hosts(image, host_set3) host_set4 = remove_hosts_that_cannot_access_primary_storage(host_set3) host_set5 = remove_avoided_hosts(host_set4) host_set6 = call_tag_plugin(tags, host_set5) return pick_vm_last_host(host_set6)
LeastVmPreferredHostAllocatorStrategy
l2_networks = get_parent_l2_networks(l3_networks) host_set1 = find_hosts_in_cluster_that_have_attached_to_l2_networks() check_if_backup_storage_having_image_have_attached_to_zone_of_hosts(host_set1) host_set2 = remove_hosts_not_having_state_Enabled_and_status_Connected(host_set1) host_set3 = remove_hosts_not_having_capacity_required_by_instance_offering(host_set2) primary_storage = find_Enabled_Connected_primary_storage_having_enough_capacity_for_root_volume_and_attached\ _to_clusters_of_hosts(image, host_set3) host_set4 = remove_hosts_that_cannot_access_primary_storage(host_set3) host_set5 = remove_avoided_hosts(host_set4) host_set6 = call_tag_plugin(tags, host_set5) return pick_host_with_the_fewest_vm(host_set6)
MinimumMemoryUsageHostAllocatorStrategy
l2_networks = get_parent_l2_networks(l3_networks) host_set1 = find_hosts_in_cluster_that_have_attached_to_l2_networks() check_if_backup_storage_having_image_have_attached_to_zone_of_hosts(host_set1) host_set2 = remove_hosts_not_having_state_Enabled_and_status_Connected(host_set1) host_set3 = remove_hosts_not_having_capacity_required_by_instance_offering(host_set2) primary_storage = find_Enabled_Connected_primary_storage_having_enough_capacity_for_root_volume_and_attached\ _to_clusters_of_hosts(image, host_set3) host_set4 = remove_hosts_that_cannot_access_primary_storage(host_set3) host_set5 = remove_avoided_hosts(host_set4) host_set6 = call_tag_plugin(tags, host_set5) return pick_host_with_the_lowest_memory_load(host_set6)
MinimumCPUUsageHostAllocatorStrategy
l2_networks = get_parent_l2_networks(l3_networks) host_set1 = find_hosts_in_cluster_that_have_attached_to_l2_networks() check_if_backup_storage_having_image_have_attached_to_zone_of_hosts(host_set1) host_set2 = remove_hosts_not_having_state_Enabled_and_status_Connected(host_set1) host_set3 = remove_hosts_not_having_capacity_required_by_instance_offering(host_set2) primary_storage = find_Enabled_Connected_primary_storage_having_enough_capacity_for_root_volume_and_attached\ _to_clusters_of_hosts(image, host_set3) host_set4 = remove_hosts_that_cannot_access_primary_storage(host_set3) host_set5 = remove_avoided_hosts(host_set4) host_set6 = call_tag_plugin(tags, host_set5) return pick_host_with_the_lowest_cpu_load(host_set6)
MaxInstancePerHostHostAllocatorStrategy
l2_networks = get_parent_l2_networks(l3_networks) host_set1 = find_hosts_in_cluster_that_have_attached_to_l2_networks() check_if_backup_storage_having_image_have_attached_to_zone_of_hosts(host_set1) host_set2 = remove_hosts_not_having_state_Enabled_and_status_Connected(host_set1) host_set3 = remove_hosts_not_having_capacity_required_by_instance_offering(host_set2) primary_storage = find_Enabled_Connected_primary_storage_having_enough_capacity_for_root_volume_and_attached\ _to_clusters_of_hosts(image, host_set3) host_set4 = remove_hosts_that_cannot_access_primary_storage(host_set3) host_set5 = remove_avoided_hosts(host_set4) host_set6 = call_tag_plugin(tags, host_set5) return pick_host_with_vm_is_less_than_expected(host_set6)
Indicates that VM instances can be created from this instance offering.
Indicates that VM instances cannot be created from this instance offering.
Back to Top
Email Us
contact@zstack.ioEmail Us
contact@zstack.ioEmail Us
contact@zstack.ioThe download link is sent to your email address.
If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.Thank you for using ZStack products and services.
Submit successfully.
We'll connect soon.Thank you for using ZStack products and services.