Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 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

share|improve this answer

Your Answer

 
discard

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.