VIX allows you to automate virtual machine operations and is the engine behind for example VMware's vmrun command.
VMware VIX API page
JVix
pyVix
pyvmware
Support my products