Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Background: One of the policies of our vCenter cluster is for (almost) every VM to have an "expiration date". This is a custom field in the annotations panel that is mainly a reminder to contact the owner of the VM and verify the system is still relevant.

My question: What is the best way to sort through a group of VMs by a particular annotation field? Are there any tools that VMWare provides to view VMs by their annotation summaries? Or is there a better way to accomplish the goal of tracking VM lifespans altogether?

share|improve this question
That's got perl sdk written all over it I'm afraid, nothing in the standard tool set sorry – Chopper3 Mar 8 '12 at 23:38

powercli handles this pretty easily.

get-vm | get-annotation -customattribute $my_annotation | sort -property value

or if you want to export to csv and work with the data there:

get-vm | get-annotation -customattribute $my_annotation | select annotatedentity, name, value | export-csv -notypeinformation

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.