Hello,
I want to collect inventory data of hosts, virtual machines, cluster, datastore, resourcepool and also performance data of hosts and virtual machines using python. Can someone please advice which will be the right python SDK to use and where can I get it from?
Thanks
I would suggest to use pymomi vSphere management SDK: https://github.com/vmware/pyvmomi
To get samples: You can refer All Samples - Samples - VMware Developer Center (select python as language).
Thanks for the reply. I have one more question regarding this SDK.
To create a connection we use pyvmomi.connect.SmartConnect which returns a service instance object. I can find a VM by instance uuid using function serviceinstance.content.searchIndex.FindByUuid(). But if there is a new VM added from Vcenter sometime after creating service instance object, will it be searchable using the same service instance object using FindByUuid() function or do I have to refresh the connection in some way and get new service instance object to be able to get this new VM?