Cluster
Overview
A cluster is a logical group of hosts (compute nodes). In a real data center, a cluster usually maps to a rack.
- All hosts in the same cluster must be installed with the same operating system.
- All hosts in the same cluster must have the same network configuration.
- All hosts in the same cluster must be able to access the same primary storage.
- Before a cluster can provide VM services, the cluster must have a primary storage and an L2 network attached.
- The scale of a cluster, which is the maximum number of hosts that the cluster can contain, is not limited.
The relationship between a typical cluster and its associated resources is as follows:
Cluster | Zone
You can create more than one cluster in a zone, and allocate newly created hosts to different clusters as needed.
Cluster | Primary Storage and L2 Network

Note:
- Cluster | Primary Storage
- A primary storage can be attached to one or more clusters.
- A cluster can have one or more primary storage attached.The following are primary storage of the same type that a cluster can have:
- A cluster can have one or more LocalStorage primary storage attached.
- A cluster can have one or more NFS primary storage attached.
- A cluster can have one or more SharedBlock primary storage attached.
- A cluster can have one SharedMountPoint (SMP) primary storage attached.
- A cluster can have only one Ceph primary storage attached.
- A cluster can have only one Vhost primary storage attached.
- A cluster can have only one ZBS (CBD protocol) primary storage attached.
- A cluster can have only one AliyunNAS primary storage attached.
- A cluster can have only one AliyunEBS primary storage attached.
The following are combinations of primary storages that a cluster can have:- A cluster can have both a LocalStorage and an NFS primary storage attached.
- A cluster can have both a LocalStorage and an SMP primary storage attached.
- A cluster can have both multiple LocalStorage and multiple SharedBlock primary storage attached.
- A cluster can have both a Ceph and a maximum of three LocalStorage primary storage attached.
- A cluster can have both a Ceph and a SharedBlock primary storage attached.
- A cluster can have both a Ceph and more than one SharedBlock primary storage attached.
- A cluster can have both a Ceph and multiple NFS primary storage attached.
- A cluster can have both one Ceph, multiple SharedBlock, and one ZBS (CBD protocol) primary storage attached.
Note: In a Kylin V10 SP3 x86_64 environment, a single cluster cannot currently have both Ceph (ZStone) and ZBS (CBD protocol) primary storage attached. - A cluster can have both multiple NFS and multiple SharedBlock primary storage attached.
-
A cluster can have both a ZBS (CBD protocol) and multiple SharedBlock primary storage attached.
-
A cluster can have both a ZBS (CBD protocol) and multiple Local Storage primary storage attached.
-
A cluster can have both a ZBS (CBD protocol) and a Ceph primary storage attached.
-
A cluster can have both a Vhost and multiple SharedBlock primary storage attached.
- A cluster can have both a Vhost and a Ceph primary storage attached.
The following table lists the relationship between a primary storage and a cluster.Primary Storage Cluster LocalStorage A cluster can have one or more LocalStorage primary storage attached. NFS A cluster can have one or more NFS primary storage attached. SharedBlock A cluster can have one or more SharedBlock primary storage attached. SMP A cluster can have one SMP primary storage attached. Ceph A cluster can have only one Ceph primary storage attached. Vhost A cluster can have only one Vhost primary storage attached. ZBS (CBD protocol) A cluster can have only one ZBS (CBD protocol) primary storage attached. AliyunNAS A cluster can have only one AliyunNAS primary storage attached. AliyunEBS A cluster can have only one AliyunEBS primary storage attached. LocalStorage + NFS A cluster can have one LocalStorage and one NFS primary storage attached. LocalStorage + SMP A cluster can have one LocalStorage and one SMP primary storage attached. LocalStorage + SharedBlock A cluster can have multiple LocalStorage and multiple SharedBlock primary storage attached. Ceph + LocalStorage A cluster can have both a Ceph and a maximum of three LocalStorage primary storage attached. Ceph + SharedBlock - A cluster can have one Ceph and one SharedBlock primary storage attached.
- A cluster can have one Ceph and multiple SharedBlock primary storage attached.
Ceph + SharedBlock + ZBS (CBD protocol) A cluster can have one Ceph, multiple SharedBlock, and one ZBS (CBD protocol) primary storage attached.
Note: In a Kylin V10 SP3 x86_64 environment, a single cluster cannot currently have both Ceph (ZStone) and ZBS (CBD protocol) primary storage attached.Ceph + NFS A cluster can have both a Ceph and multiple NFS primary storage attached. NFS + SharedBlock A cluster can have both multiple NFS and multiple SharedBlock primary storage attached. ZBS (CBD protocol) + Shared Block A cluster can have both a ZBS (CBD protocol) and multiple SharedBlock primary storage attached.
ZBS (CBD protocol) + Local Storage A cluster can have both a ZBS (CBD protocol) and multiple Local Storage primary storage attached.
ZBS (CBD protocol) + Ceph A cluster can have both a ZBS (CBD protocol) and a Ceph primary storage attached.
Vhost + Shared Block A cluster can have both a Vhost and multiple SharedBlock primary storage attached.
Vhost +Ceph A cluster can have both a Vhost and a Ceph primary storage attached. - When you attach multiple LocalStorage primary storage to a cluster, partition the corresponding URLs on the hosts before you add hosts and primary storage, and make sure that each LocalStorage is deployed on an exclusive logical volume or physical disk.
- A primary storage can be accessed by all hosts in the cluster to which the primary storage belongs.
- If a primary storage cannot be accessed by hosts in the cluster due to network typology changes in the data center, you can detach the primary storage from the cluster.
- Cluster | L2 Network
- A cluster can have one or more L2 networks attached. Also, an L2 network can be attached to one or more clusters.
- A cluster can have a VXLAN pool attached. The VNIs in the VXLAN pool can be used to create different VXLAN networks.
- One NIC can be used to create only one NoVlan network.
- For VLAN networks, different VLAN IDs represent different L2 networks.
- If hosts in a cluster no longer exist in the layer 2 broadcast domain of an L2 network due to network typology changes in the data center, you can detach the L2 network from the cluster.
Cluster | Image Storage
No direct dependency exists between a cluster and an image storage. An image storage can provide services for multiple clusters.
| PS/BS | ImageStore | Ceph |
| LocalStorage | ○ | × |
| NFS | ○ | × |
| SMP | ○ | × |
| Ceph | ○ | ○ |
| SharedBlock | ○ | × |
| Vhost | ○ | × |
| ZBS (CBD protocol) | ○ | × |
- When primary storage are LocalStorage, NFS, or SMP, the default type for image storage is ImageStore.
- When primary storage are NFS or SMP, you can manually mount the corresponding shared directories to the local directories of the corresponding image storage. In this regard, both primary storage and image storage can use the network shared storage.
- When primary storage is Ceph, you can use the primary storage in the same Ceph cluster as image storage. You can also use the ImageStore primary storage as image storage.
- When primary storage is SharedBlock, the default type for image storage is ImageStore.
- When primary storage is AliyunNAS, the default type for image storage is ImageStore.
- When primary storage is AliyunEBS, the default type for image storage is AliyunEBS.
Inventory
Properties
| Name | Description | Optional | Valid 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 | |
| hypervisorType | The hypervisor type. For more information, see Cluster Hypervisor Type. |
|
0.6 | |
| state | The state. For more information, see Resource Property. |
|
0.6 | |
| zoneUuid | The UUID of the zone to which the cluster belongs. For more information, see Zone. | 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 | ||
| type | The reserved field. | 0.6 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 0.6 |
Sample
{
"inventories":
{
"createDate": "Oct 30, 2017 1:50:00 PM",
"description": "",
"hypervisorType": "KVM",
"lastOpDate": "Oct 30, 2017 1:50:00 PM",
"name": "Cluster-1",
"state": "Enabled",
"type": "zstack",
"uuid": "5c3699713b1c43219de14df7545f24d0",
"zoneUuid": "e59b71e99d8a4ea1952b578388b8cd1d"
}
}
Hypervisor Type
Hypervisor type indicates what kind of hypervisor (operating system) is installed on hosts in a cluster.
State
A cluster has the following two states: Enabled and Disabled, which is similar to Zone. When you change the state of a cluster, the change operation will be cascaded to all hosts in the cluster. For example, if you disable a cluster, you will also disable all hosts in the cluster.
Operations
CreateCluster
CreateCluster name=cluster1 hypervisorType=KVM zoneUuid=1b830f5bd1cb469b821b4b77babfdd6fParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| zoneUuid | The parent zone UUID. | 0.6 | ||
| name | The resource name. For more information, see Resource Property. | 0.6 | ||
| resourceUuid | The resource UUID. For more information, see CreateUserTag. | Yes | 0.6 | |
| description | The resource description. For more information, see Resource Property. | Yes | 0.6 | |
| hypervisorType | The hypervisor type. For more information, see Cluster Hypervisor Type. | Yes |
|
0.6 |
| type | The reserved field for internal use. | Yes |
|
4.0.0 |
| architecture | Yes |
|
4.0.0 | |
| tagUuids | The tag UUIDs. | 4.0.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is ClusterVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is ClusterVO. | Yes | 0.6 | |
| timeout | Yes |
DeleteCluster
DeleteCluster uuid=c1bd173d5cd84f0e9e7c47195ae27ec6Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The cluster UUID. | 0.6 | ||
| deleteMode | The delete mode. For more information, see DeleteResources. | Yes |
|
0.6 |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is ClusterVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is ClusterVO. | Yes | 0.6 | |
| timeout | Yes |
QueryCluster
QueryCluster hypervisorType=KVMQueryCluster primaryStorage.availableCapacity>=100000000Primitive Fields of Query
See Cluster Inventory.
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| zone | Zone Inventory | The parent zone. | 0.6 |
| host | Host Inventory | The host that belongs to the cluster. | 0.6 |
| vmInstance | VM Instance Inventory | The VM instance that belongs to the cluster. | 0.6 |
| l2Network | L2 Network Inventory | The L2 network that is attached to the cluster. | 0.6 |
| l2VlanNetwork | l2VlanNetwork Inventory | The L2 network that is attached to the cluster. This L2 network uses VLAN to create layer 2 broadcast domains. | 0.6 |
| primaryStorage | Primary Storage Inventory | The primary storage that is attached to the cluster. | 0.6 |
UpdateCluster
UpdateCluster uuid=26aad17353dd4de0ac7bc5540d76da23 name=testParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The cluster UUID. | 0.6 | ||
| name | The resource name. For more information, see Resource Property. | Yes | 0.6 | |
| description | The resource description. For more information, see Resource Property. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is ClusterVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is ClusterVO. | Yes | 0.6 | |
| timeout | Yes |
ChangeClusterState
ChangeClusterState uuid=26aad17353dd4de0ac7bc5540d76da23 stateEvent=enableParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The cluster UUID. | 0.6 | ||
| stateEvent | The state event. | Yes |
|
0.6 |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is ClusterVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is ClusterVO. | Yes | 0.6 | |
| timeout | Yes |
UpdateClusterOS
UpdateClusterOS uuid=fb498a6086ea43449f33d5bbb9daa73eParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The cluster UUID. | 0.6 | ||
| excludePackages | The packages not to be upgraded. | Yes | 3.7.0 | |
| updatePackages | The packages to be upgraded. | Yes | 3.7.0 | |
| releaseVersion | The release version of the operating system. | Yes | 3.7.0 | |
| resourceUuid | Yes | 3.7.0 | ||
| tagUuids | The tag UUID list. | Yes | 3.7.0 | |
| force | Whether update the cluster OS forcefully. | Yes | 5.2.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is ClusterVO. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is ClusterVO. | Yes | 0.6 | |
| timeout | Yes |
Tags
User Tags
resourceType=ClusterVO. For
example,CreateUserTag resourceType=ClusterVO resourceUuid=80a979b9e0234564a22a4cca8c1dff43 tag=secureClusterSystem Tags
| Tag | Description | Example | Starting Version |
|---|---|---|---|
host::reservedMemory::{capacity} |
See Host Capacity Reservation. | host::reservedMemory::1G |
0.6 |
