Posted by on January 31, 2015

Whilst I’m aware that it’s simple enough to type vim-cmd vmsvc/getallvms from the cli in vSphere/ESXi, having a program spawning another program is a bit of a pain, especially having to parse the results(vim-cmd output is a bit of a mess). To programmatically handle this requires a bit of messing around with xml and then having to parse a number of files that are listed in the xml files to get your results. However the code is quite easy to modify so that you could do things such as list allocated vCPUs, or total allocated memory.

I’ve uploaded the code to github here.

Example output:


Posted in: Computers


Be the first to comment.

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>