Skip to content

Instantly share code, notes, and snippets.

@dagvl
Created March 19, 2009 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dagvl/81893 to your computer and use it in GitHub Desktop.
Save dagvl/81893 to your computer and use it in GitHub Desktop.
import vix
server_h = vix.Vix()
server_h.Connect(hostname='hostname',
username='username', password='password',
provider=vix.Vix.VIX_SERVICEPROVIDER_VMWARE_VI_SERVER)
running_vms = server_h.FindItems()
#vmware-server 2.0 and newer
all_vms = server_h.FindItems(searchType=vix.Vix.VIX_FIND_REGISTERED_VMS)
server_h.Disconnect()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment