Cloud Server Tags
Cloud Server Tags
Tags are labels that can be added to cloud servers. Tags can be used to:
- add additional information about the server: image, configuration, purpose of the server, the environment in which the server is used, and other attributes;
- filter the servers in the list.
You can add the tag to existing cloud server or when creating a server.
Restrictions
The maximum number of tags for one cloud server is 10.
You cannot change an added tag — you must delete tag and add a new one.
Add a tag to an existing cloud server
- Control panel
- OpenStack CLI
- In Control Panel, go to Cloud Platform → Servers.
- Open the Servers tab.
- If tags have not yet been added to the server, select Add Tags from the server menu.
- If tags have been added, select Modify Tags from the server menu.
- Enter the name of the tag. The maximum length of the tag is 60 characters. You can use Latin and Cyrillic letters, numbers and hyphen sign.
- Click Save.
-
Add a tag to the server:
openstack server set --tag <tag_name> --os-compute-api-version 2.26 <server>
Specify:
<tag_name>
is the name of the tag;<server>
— cloud server ID or name, can be viewed withopenstack server list
Filter servers by the tag
- Control panel
- OpenStack CLI
- In Control Panel, go to Cloud Platform → Servers.
- Open the Servers tab.
- To see a list of servers with a tag, click on the tag in the list. Multiple tags can be selected.
-
Filter the servers.
If you need to see a list of servers with the tag:
openstack server list --tags <tag_name> --os-compute-api-version 2.26
If you need to see a list of servers without a tag:
openstack server list --not-tags <tag_name> --os-compute-api-version 2.26
Specify
<tag_name>
is the name of the tag.
Remove the tag
- Control panel
- OpenStack CLI
You can delete any tag except the Breakable
service tag. If you want to make the server uninterruptible, change server-type.
- In Control Panel, go to Cloud Platform → Servers.
- Open the Servers tab.
- In the tag list, click Modify Tags.
- Remove the tag.
- Click Save.
- Click .
-
Remove the tag:
openstack server unset --tag <tag_name> --os-compute-api-version 2.26 <server>
Specify:
<tag_name>
is the name of the tag;<server>
— cloud server ID or name, can be viewed withopenstack server list