You can use custom attributes in the vSphere Client to assign user-specific values for each object of the custom attribute type.

After you create the attributes, set the value for the attribute on each virtual machine or managed host, as appropriate. This value is stored with vCenter Server and not with the virtual machine or managed host. Use the new attribute to filter information about your virtual machines and managed hosts. If you no longer need the custom attribute, remove it. A custom attribute is always a string.

For example, suppose that you have a set of products and you want to sort them by sales representative. Create a custom attribute for the sales person's name, Name. Add the custom attribute, Name, column to one of the list views. Add the appropriate name to each product entry. Click the column title Name to sort alphabetically.

The custom attributes feature is available only when you are connected to a vCenter Server system.

How Do You Add and Edit Custom Attributes in the vSphere Client

You can create custom attributes in the vSphere Client and associate these custom keys with an object, such as a host, virtual machine, cluster, or network. You can then assign a user-specific value using the custom attributes to specific objects in your vCenter Server environment.

After you create the attributes, set an appropriate value for the attribute on each inventory object. The attribute value is stored with vCenter Server and not with the inventory object. Use the new attribute to filter your inventory objects. If you no longer need the custom attribute, remove it. A custom attribute is always a string.

For example, suppose that you have lots of virtual machines in your inventory and you want to sort them by owner.
  1. Create a VM-owner custom attribute for the virtual machine type of inventory objects.
  2. Add the name of the owner to each VM entry you want and use the Global Inventory Lists pane to add the VM-owner custom attribute column to one of the list views.
  3. You can now click the VM-owner column to sort alphabetically by owner.
    Tip: If you cannot use the custom attribute column to sort the list of inventory objects, you can export the content of the list view and then use the sorting options on the saved CSV file.
Note: Tags and tag categories support a finer-grained mechanism for tagging your object. Consider using tags and tag categories instead of custom attributes.

Prerequisites

Required privileges:
  • Global.Manage custom attributes
  • Global.Set custom attribute

Procedure

  1. From the vSphere Client Home menu, click Tags & Custom Attributes.
  2. Click Custom Attributes.
    All currently defined custom attributes for vCenter Server are displayed.
  3. Click New.
    The custom attributes tab which displays the existing custom attributes and the button to create a new one.
  4. Enter the values for the custom attribute.
    1. Enter the name of the attributes in the Attribute text box.
    2. Select the attribute type from the Type drop-down menu.
    3. Click OK.
    After you have defined an attribute on an object, it is available to all objects of that type in the inventory. However, the value you specify is applied only to the currently selected object.
  5. You can later add a value to the custom attribute for each inventory object that you want.
    1. Navigate to an inventory object in your vCenter Server inventory.
    2. On the Summary tab, navigate to the Custom Attributes card.
    3. Click Edit.
      The summary tab of a cluster which includes a Custom Attributes card.
      • If you want to add a value to an existing custom attribute, enter or edit the attribute value in the Value column.
      • If you want to create a new custom attribute, enter a name and value to the attribute and select the attribute type from the Type drop-down menu. Click Add.
    4. Click Save.