Skip to main content

The VMWare scripting API is fully mapped to python. To each perl class corresponds a python class with the same name, all perl methods are available from python on created objects. Each object created in python has its counterpart in a parallel perl process.

>>> import VMPython
>>> s = VMPython.Server()             # s is a Server object
>>> c = VMPython.ConnectParams()      # c is a ConnectParams object
>>> s.connect(c)                      # connect s using c
True                                  # success
>>> vm = VMPython.VM()                # vm is a VM object
>>> vmid = s.registered_vm_names()[0] # the first registered vm on server s
>>> vm.connect(c, vmid)               # connect vm using c
True                                  # success
>>> vm.get_pid()                      # PID of the guest process
'27502'                               # I get this number as a string

Metadata

Release history Release notifications | RSS feed

This release

0.1 This release

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page