VIX allows you to automate virtual machine operations and is the engine behind for example VMware's vmrun command.
VMware VIX API page
VMware VIX API reference Guide
VMware VIX API Blog
JVix
pyVix
pyvmware
Rexx/Vix
VMWareTasks
vixCOMWrapper