Question

Anybody here uses such a library? Or using ctypes with VIX API dll is enough for the task of managing VMWare images?

What do you think and what you can suggest based on your experience? Is there any active and up-to-date solution written in Python?

Was it helpful?

Solution 2

It seems that pysphere, vix fit.

It's updated to the last version of VMware API, and it's been developed and maintainted for a while now.

Even though for really complex scripts you should use the official bindings for powershell: VMWare PowerCLI.

OTHER TIPS

I'd recommend the official library released by VMware instead: pyVmomi. It mirrors the vSphere Web Services SDK and works in Python 2 or 3.

There's a discussion here: What is the Difference between PySphere and PyVmomi?

If your VirtualMachine objects are part of a vSphere environment you should use pyVmomi and use the GuestOperations. VIX has actually been deprecated from vSphere https://www.vmware.com/support/developer/vix-api/VIX-1.14-ReleaseNotes.html#Deprecate and should really only be used for Fusion or Workstation.

I used ctypesgen to generate a ctypes wrapper for the VIX dylib and wrote some helper classes (Host, VM, Job, etc.). I use it to revert VMs to named snapshots and run scripts in the guest.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top