Use tags to encode information about a datastore. The tags are helpful when your datastore is not represented by a storage provider and does not advertise its services in the VM Storage Polices interface. You can also use the tags to indicate a property that is not communicated through a storage provider, such as a geographical location or administrative group.

About this task

You can apply a new tag that contains general storage information to a datastore. For more details about the tags, their categories, and how to manage the tags, see the vCenter Server and Host Management documentation.

Prerequisites

Required privileges:

  • vSphere Tagging > Create vSphere Tag on the root vCenter Server instance

  • vSphere Tagging > Create vSphere Tag Category on the root vCenter Server instance

  • vSphere Tagging > Assign or Unassign vSphere Tag on the root vCenter Server instance

Procedure

  1. Create a category for storage tags.
    1. From the vSphere Web Client Home, click Tags & Custom Attributes.
    2. Click the Tags tab and click Categories.
    3. Click the New Category icon ().
    4. Specify the category properties. See the following example.

      Category Property

      Example

      Category Name

      Storage Location

      Description

      Category for tags related to location of storage

      Cardinality

      Many tags per object

      Associable Object Types

      Datastore and Datastore Cluster

    5. Click OK.
  2. Create a storage tag.
    1. On the Tags tab, click Tags.
    2. Click the New Tag icon ().
    3. Specify the properties for the tag. See the following example.

      Tag Property

      Example

      Name

      Texas

      Description

      Datastore located in Texas

      Category

      Storage Location

    4. Click OK.
  3. Apply the tag to the datastore.
    1. Browse to the datastore in the vSphere Web Client navigator.
    2. Right-click the datastore, and selectTags & Custom Attributes > Assign Tag.
    3. From the Categories drop-down menu, select the Storage Location category.
    4. Select an appropriate tag, for example Texas, and click Assign.

Results

The new tag is assigned to the datastore and appears on the datastore Summary tab in the Tags pane.

What to do next

When creating a VM storage policy, you can reference the tag to include the tagged datastore in the list of compatible storage resources. See Create Storage-Specific Rules for a VM Storage Policy.

Or you can exclude the tagged datastore from the VM storage policy. For example, your VM storage policy can include Virtual Volumes datastores located in Taxes and California, but exclude datastores located in Nevada.

To learn more about how to use tags in VM storage policies, watch the following video.