vSphere 5.1 - Working with Tags

Within vSphere 5.1 a new feature called Tags has been introduced by VMware. Tags are an enhancement of Custom Attributes and enables users to categorize inventory objects. They are a great approach for organizing or reporting tasks. Tags can be associated to the following object types:

  • Cluster
  • Datacenter
  • Datastore
  • Distributed Port Group
  • Distributed Switch
  • Folder
  • Host
  • Network
  • Resource Pool
  • Datastore Cluster
  • vApp
  • Virtual Machine
  • vCO Scheduled Workflow
  • vCO Workflow

Tags are classified in categories and there are two types of categories. Categories where you can only assign 1 tag per object, and categories with multiple tags per object.

Create Categories and Tags

Use case 1: Virtual Machine Cost Centre
Of course, a virtual machine can be assigned to only one cost centre. The first category can only be applied once per Object.

  1. Open vSphere Web Client
  2. Navigate to Tags
    Tags
  3. Open Categories
    tags_categories
  4. Click New Category
    tags_new_category
  5. Enter a Name, select 1 tag per object and choose object type Virtual Machine
    tags_cost_centre
  6. Open Tags
    tags_categories
  7. Click New Tag
    tags_new_tag
  8. Enter a Name and select category Cost Centre
    tags_tag_sales
  9. Repeat Step 7 and 8 until you have a few Cost Centres
    tags_cost_centres
  10. Navigate to Virtual Machine Summary Screen to Assign a Tag
    Assign_tag
  11. Assign the Virtual Machine to the Sales Department
    assign_tag_sales

Use case 2: Applications running on a Virtual Machine
The second category applications can be a assigned many times to a virtual machine. Use the same procedure to create the category, tags and assign it to a bunch of virtual machines.

second_category many_tags

 

Search Tags

To find all objects that have a specific tag assigned, just have to click the Tag Name in the Tags overview:
Search_tags

Result:
search_result

 

vSphere 5.1 Tags with API, SDK or PowerCLI

Unfortunately the tag feature is only available through the webclient at the moment. You can neither set, nor work with tags by any other tool or API. But i am sure that this will be changed in an upcoming release.

  1. vSphere 5.5 – Managing Tags with PowerCLI | Virten.net - pingback on September 25, 2013 at 6:49 pm

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Trackbacks and Pingbacks: