You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by Markos Gogoulos <mg...@mist.io> on 2015/05/19 22:07:50 UTC

[dev] libcloud vSphere compute driver with pyvmomi

Dear all,

we are working on a vsphere compute driver that is based on pyvmomi instead
of pysphere as the library to communicate with the vsphere API. Pysphere is
a deprecated library (since 2013) that has created lots of trouble for us,
for example initialization of a vshere driver based on pysphere ends up in
memory allocation of 30-40 MBs, which is unacceptable if the driver is
going to be initiated many times. Furthermore we have quickly realized that
there were memory leaks on several points, and the return of list_nodes
function for a vsphere with 40-50 nodes would take more than 2 minutes,
since it uses serial calls for each node.

Most of the above problems are solved with pyvmomi library (
https://github.com/vmware/pyvmomi) which is the official Vmware python
library for vsphere. The project seems very active and there's also another
project https://github.com/vmware/pyvmomi-community-samples with samples of
pyvmomi's usage.

The driver does not seem to leak memory, although it still asks for 10-20MB
on initiation - this seems to be caused by the fact that it loads auto
generated code from proprietary vmware files... Really sad but nothing we
can do to avoid it.

So our pyvmomi based vsphere driver can be found on
https://github.com/mistio/libcloud/blob/mistio/libcloud/compute/drivers/vsphere.py
Needs work and provides less features than the existing libcloud's driver
but it is much more stable (list nodes returns quickly with one API call,
no memory leaks, lighter memory usage on initialization). Hope it will be
useful to others!

Cheers,
Markos