How to use machine tags (snap/2.9/UI)

2.9 3.0 3.1
DEB CLI ~ UI CLI ~ UI CLI ~ UI
SNAP CLI ~ UI CLI ~ UI CLI ~ UI

This article will explain:

How to create and assign machine tags to machines

If you want to create a new tag, and simultaneously assign it to a machine, use the following steps:

  1. Go to the machine list and select the machine you’re interested in modifying, by checking the box next to the machine name:

  1. Select the “Take action” drop-down menu and select “Tag”:

  1. Create and/or assign the desired tag, as described in the general tagging procedure above.

  2. Don’t forget to hit the “Tag machine” button when you’re done, to apply your changes to the machine.

How to tag multiple machines at once

In the first step of the above procedure, you can select more than one machine:

Any tags you add in the “Tags” box will be applied to all selected machines, as noted by the change in the “Tag machine” button:

Other than the scope of the transaction (e.g., tagging three machines, in this case), everything else about this operation conforms to the general tag assignment procedure.

How to remove and delete machine tags from machines

To remove machine tags from a machine:

  1. View a machine’s currently assigned tags: stay on the ‘Machines’ page and click on the machine in question. MAAS will display currently-assigned tags in the Tags pane of the ‘Machine summary’.

  2. Select the ‘Configuration’ tab and then the ‘Edit’ button alongside ‘Machine configuration’ to edit tags:

  3. Follow the general tag removal procedure.

How to list machine tags for multiple machines

In the MAAS UI, you don’t explicitly list all machine tags; instead, you filter by them using the “Filter by” drop-down. This filtered list does not distinguish between virtual machines (VMs) and physical machines, unless you’ve assigned tags to help with that distinction.

Here’s how you can filter the machine list by machine tags, using the MAAS UI:

  1. To list all tags, visit the ‘Machines’ tab and expand the ‘Tags’ subsection in the left pane. In this view, you can use tags as machine search filters.

  2. Select one or several tags. The machines that satisfy all selected tags will display on the right pane. Notice there is a search field at the top of the right pane. You can type a search expression into this field.

Below, tag ‘virtual’ has been selected (with the mouse), and the search field automatically reflects this. Five machines satisfy this search filter.

Remove a tag from the search filter by either hitting the ‘x’ character alongside a tag or editing the search expression.

How to view machine tags for one machine

To view the tags assigned to a specific machine, use the following procedure:

  1. On the machine list, select the machine of interest by clicking on its name.

  2. On the machine detail screen that comes up, look for the tags on one of the cards presented there: the tags for that machine should be listed there.

How to view machine tags for a VM host

To view the machine tags assigned to a VM host, here’s the procedure you’ll follow:

  1. Click on the KVM tab at the top of the screen. This will bring you to a list of active KVMs for your system:

  1. On the detail screen that comes up, choose the “Settings” tab at the top:

  1. In the settings tab, you’ll see a box labelled “Tags.” You can use this box to view, assign, edit, or remove tags for the KVM:

Note that you can only see the tags for a VM host in the same place that you change it. For a more comprehensive list of VM host tags, use the MAAS CLI.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.