As I’ve posted in the past, use of tags for XenServer resources is a powerful organizing tool for keeping track of what your virtual machines are running and who they belong to. Tags bring a dynamic, flexible “web 2.0” approach to identifying and finding your resources.

But you may find that you want to make a more global extension to your configurations.  You may wish to identify all hosts with their physical location, for instance, or label the cost center and applications running on all of your virtual machines.

It’s easy to add that sort of structured information too.

Simply select your server or virtual machine (or other resource) and choose the “Properties” option on the XenCenter right-click menu or appropriate top-level menu.  You’ll see a tab for “Custom Fields.”

Add the custom field, then give it a value.  It will show up on the General tab, it will be available in the configuration of searches, and it will be visible on the Custom Fields property tab of every resource.

Once they’re set, you can even access the custom fields via the command line:

   xe vm-list other-config:XenCenter.CustomFields.Owner=Foo --multiple

…will find all virtual machines whose “Owner” field is set to “Foo”.

Custom Fields enable organizations not only to find and manage their resources more effectively, but to organize and report on them as well.