We are trying to automate changing the password of vCenter "root" local account, preferably with Python.
Is there any way to do it with pyvmomi ?
If not, is there a recommended way ?
Yes, you can use the vCenter REST API for https://developer.vmware.com/apis/vsphere-automation/latest/appliance/appliance/local_accounts/ its not in pyvmomi but rather in the vSphere Automation SDK for Python or you can simply use any Python REST Client
Actually the password change is made by VMware adapted tools or scripts. You can try to use the custom method mentionned in the following site:
and use this method in the Python SDK.
Yes, you can use the vCenter REST API for https://developer.vmware.com/apis/vsphere-automation/latest/appliance/appliance/local_accounts/ its not in pyvmomi but rather in the vSphere Automation SDK for Python or you can simply use any Python REST Client
Thanks, this helped.
We found our own forgotten experimental code that had successfully used the REST API .
We also some sample code here - local_accounts.py, it too seems to work.