I was at VMWorld last week. Unfortunately, my network connectivity was limited so I was unable to post my notes during the conference.

Due to a long line, I actually missed the first lab I had scheduled for the day. That lab was on performance benchmarking (which I later heard a talk on so I think I made out about even…)

Lab06 – VI Perl Toolkit Scripting to Administer VMWare Infrastructure

Overall this lab was a nice introduction to the perl API. However, if you had any experience at all with the API, there probably would not be a whole lot new learned during this lab. Some of the items I took away from the lab:

  • Perl API can be executed against Virtual Center or ESX server
  • Realtime information can be gathered directly from the ESX server
  • "If you can do it in VirtualCenter, you can do it with the perl toolkit"

Generic Perl Script Pattern:

  • Import VI runtime modules
  • Customize options (datacenter, virtual center, etc.)
  • Parse & validate options
  • Connect to server
  • Obtain, process and display results
  • Close the server connection

Perl Script Repository:


Currently just sample scripts but will eventually be expanded to include user generated scripts

SDK Reference Guide:

Forum: http://www.vmware.com/community/forum.jspa?forumID=393

Trouble Shooting:

Use "Managed Object Browser" (MOB) – web interface to get object names and what responses will look like. Viewable via web interface on Virtual Center.