Tags
You can create a user tag on a VM instance by using
resourceType=VmInstanceVO. For
example,
CreateUserTag tag=web-server-vm resourceType=VmInstanceVO \
resourceUuid=a12b3cc9ee4440dfb00d41c1d2f72d08
System Tags
HostName
You can specify a hostname for the default L3 network of a VM instance. This tag is usually specified in the systemTags parameter when you call CreateVmInstance. If the default L3 network has a DNS domain, the hostname received by the VM instance operating system will automatically use this DNS domain extension. For example, if the hostname is web-server and the default DNS domain of the L3 network is zstack.org, then the final hostname is web-server.zstack.org.
Tag | Description | Example | Starting Version |
---|---|---|---|
hostname::{hostname} | The hostname of the default L3 network. | hostname::web-server | 0.6 |
For
example,
CreateVmInstance name=vm systemTags=hostname::vm1 imageUuid=d720ff0c60ee48d3a2e6263dd3e12c33 \
instanceOfferingUuid=76789b62aeb542a5b4b8b8488fbaced2 \
l3NetworkUuids=37d3c4a1e2f14a1c8316a23531e62988,05266285f96245f096f3b7dce671991d \
defaultL3NetworkUuid=05266285f96245f096f3b7dce671991d