Tutorial
VMware hosts an online training series — VMware Hands On Labs. They are
available for free [Registration required] at:
labs.hol.vmware.com
With Hands-on Labs, you can get a lab up and running in minutes with full technical capabilities, without downloading or installing anything new on your existing hardware.
The lab HOL-SDC-1422 - VMware Development Tools and SDKs contains a module devoted to using pyvmomi.
In this tutorial you will:
- Run a simple pyvmomi sample that lists the VMs in a datacenter.
- Learn about developing scripts with pyvmomi using Eclipse, pyDev, and Workbench IS (VMware Eclipse-based developer tools).
- Learn how to use the debugger to step through code and inspect return values.
- Use the interactive Python interpreter to walk through the vCenter inventory hierarchy, find a VM, and power it on.
When you enroll and start the lab, a virtual datacenter will be provisioned for you complete with vCenter, two ESXi hosts, storage, and a few VMs. A remote console provides a desktop with tools, pyvmomi, and a few samples already installed. Alongside is a step by step guide that walks you through the tutorial. Just skip ahead or use the table of contents (under more options) to skip to module 2.
The lab is yours for four hours at a time and you can enroll as many times as you want.
More Information
If you wish to use the same tools as in the Development Tools hands on lab, you will want Eclipse (www.eclipse.org), PyDev (pydev.org), and Workbench IS. You can find more information, and downloads for Workbench IS in the Resources section at developercenter.vmware.com