A simple library for controlling VMware vCenter / ESXi servers.
This library wraps up pyvmomi into something a little more friendly.
To use, create a Connection
object and call methods on it. e.g.
with Connection(HOST, USER, PASS) as conn:
for dev in conn.list_usb_devices_on_guest(VM_NAME):
print("Got dev: {}".format(dev))
If your host has a self-signed certificate, set the ignore_ssl_error
argument to True
.
with Connection(INSECURE_HOST, USER, PASS, ignore_ssl_error=True) as conn:
for dev in conn.list_usb_devices_on_guest(VM_NAME):
print("Got dev: {}".format(dev))
Changes in master which have not been released will be documented here.
- Add the 'interactive' optional argument to
list_processes_in_vm
. This is required to get information about expired processes that were started with theinteractive
flag.
- Raise Exceptions for failed file uploads. We noted that if a file upload failed (perhaps if an intermediate HTTP proxy rejected the size of the upload file), there was no error raise. We now check that the HTTP server gives a success result code and raise an Exception if it doesn't.
- Improvements to the Exceptions generated by the connect() method. If you were handling the underlying pyvmomi Exceptions before, you'll need to switch to handling VmNotFoundException, InvalidCredentialsException, and HostConnectException.