My favorites | Sign in
Project Logo
                
Code license: MIT License
Labels: python, vmware
Show all Featured downloads:
pyvmware-0.1.win32.exe
Feeds:
People details
Project owners:
  meddington

A python module that makes use of the vmware client sdk to control vmware instances.

NOTE: Currently beta with limited implemented methods. Enough to start, stop, and revert a VM.

from vix import Vix
import time

vm = Vix()

print "Connecting"
vm.Connect()

print "Opening vm"
vm.Open("E:\\VMs\\Windows XP\\Windows XP Professional.vmx")

#print "Powering On vm"
#vm.PowerOn()
#print "Waiting a bit..."
#time.sleep(10)
#print "Powering off vm"
#vm.PowerOff()

print "Reverting to snapshot 0"
vm.GetRootSnapshot()
vm.RevertToSnapshot()

print "Sleeping"
time.sleep(10)

print "Disconnecting"
vm.Disconnect()








Hosted by Google Code