1

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?

1
  • That's got perl sdk written all over it I'm afraid, nothing in the standard tool set sorry
    – Chopper3
    Mar 8, 2012 at 23:38

1 Answer 1

1

powercli handles this pretty easily. http://www.vmware.com/support/developer/PowerCLI/

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .