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?

  • 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
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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