Tags
User Tags
You can create a user tag on a host by using resourceType=HostVO. For example,
CreateUserTag tag=largeMemoryHost resourceUuid=0a9f95a659444848846b5118e15bff32 resourceType=HostVO
System Tags
Host Capacity Reservation
You can use system tags to reserve a portion of memory on hosts for system software.
ZStack provides various system tags and global settings to realize fine-grained memory reservation policies.
Hypervisor Global Level
If you do not have settings with other levels, you can apply the global level
:ref:kvm.reservedMemory`` to all KVM hosts.Zone Level
For information about the zone level, see zone host::reservedMemory. If you do not have settings of other levels, you can apply the zone level to all hosts in the zone. This value will override the global level.
Cluster Level
For information about the cluster level, see cluster host::reservedMemory. If you do not have settings of other levels, you can apply the cluster level to all hosts in the cluster. This value will override the zone level and global level.
Host Level
Tag Description Example Starting Version reservedMemory::{capacity}The reserved memory on the host. reservedMemory::1G0.6 The host level can override all the above levels.
For example, assume that you have three KVM hosts, namely zone->cluster1->{host1, host2, host3}:
- By default, the memory reservation for the three hosts is controlled by the global setting
:ref:kvm.reservedMemory`` with the default value 512M. - If you create a system tag
host::reservedMemory::1Gon zone1, the memory reservation of all the three hosts will be changed to 1G. - If you create a system tag
host::reservedMemory::2Gon cluster1, the memory reservation of all the three hosts will be changed to 2G. - If you create a system tag
reservedMemory::3Gon host1, the memory reservation on host1 will be changed to 3G, but still 2G on both host2 and host3.
Host Metadata Information
| Tag | Description | Example | Starting Version |
|---|---|---|---|
capability:liveSnapshot |
If this tag exists, the hypervisor of the host will support live volume snapshot. | capability:liveSnapshot |
0.6 |
os::distribution::{distribution} |
The operating system provider of the host. | os::distribution::Ubuntu |
0.6 |
os::release::{release} |
The operating system release version of the host. | os::release::trusty |
0.6 |
os::version::{version} |
The operating system version of the host. | os::version::14.04 |
0.6 |
hostCpuModelName::{hostCpuModelName} |
The CPU model of the host. | hostCpuModelName::Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz |
3.1.0 |
systemProductName::{systemProductName} |
The server model. | systemProductName::ProLiant DL388 Gen9 |
3.1.0 |
cpuGHz::{cpuGHz} |
The CPU clock speed of the host. Unit: GHz.
|
cpuGHz::2.20 |
3.1.0 |
Statements on the following three system tags: hostCpuModelName::{hostCpuModelName}, hostCpuModelName::{hostCpuModelName}, and cpuGHz::{cpuGHz}.
- These three system tags belong to the
HostVO. You can obtain these tags by using the original APIQuerySystemTag. In addition, you can obtain specified system tags by using the fuzzy search~=. - Cluster and KVM Host have defined the following two system tags:
clusterCpuModelName::{clusterCpuModelName}andcpuModelName::{cpuModelName}(such ascpuModelName::Broadwell) to be used by libvirt in migration scenario or others. Exercise caution that both the system tags are different fromhostCpuModelName::{hostCpuModelName}.
KVM Host Metadata Information
| Tag | Example | Example | Starting Version |
|---|---|---|---|
qemu-img::version::{version} |
The qemu-img version. | qemu-img::version::2.0.0 |
0.6 |
libvirt::version::{version} |
The libvirt version. | libvirt::version::1.2.2 |
0.6 |
hvm::{flag} |
The host hardware virtualization flag.
|
hvm::vmx |
0.6 |
cpuModelName::{cpuModelName} |
The CPU model of the host. | cpuModelName::Broadwell |
0.6 |
