Let’s see how to add custom attribute. Custom attributes are string and stored in vCenter. These attributes can help you sort the inventory based on the attributes
Let’s get used to how to create custom attribute
- Click on Administration menu, select custom attributes
- Select the type of attribute and provide a suitable name for it
- In my case I select Virtual Machine and added three attributes
- Business Owner
- Also I created a global attribute and named it as priority.
- Below is how it looks now
- Let’s go to virtual machine & fill these attributes as appropriate by press Edit (encircled Red)
- Same steps are followed for host as shown below
- So we create the custom attributes and associated them with the VM, host and also template (using Global attribute)
- You can export the data of all managed objects from vCenter as explain here
- Click on the folder/Datacenter/Cluster depending upon what is the scope of inventory. Then click export and you have the data shown below(please click on the image for clarity)
- This have now custom attributes added i.e. Buildby,Business owner and Purpose
- This information is highly critical when it comes to
- Charge back
- Identifying the owner
- Purpose of the Virtual Machine
Second use case is to sort the inventory data within vCenter for quick action.
- Suppose you have a DR situation where in you wish to migrate all High and medium servers to another Host.
- Then you would need to able to identify the virtual machine based on this criteria. Assuming custom attribute is create with field Priority (High,Medium and low). It is very simple to find out as shown below
- So how to action it
- Select Host or Cluster
- Select Virtual machine tab
- In filter field (contains) select priority (encircled Red)
- Select all VM’s and & migrate to another host.
So custom attributes can be of great help and they can be easily automated using SDK. Not sure if it now possible using powershell.