vmware / vsphere-automation-sdk-python

Python samples, language bindings, and API reference documentation for vSphere, VMC, and NSX-T using the VMware REST API
MIT License
739 stars 308 forks source link

[question] how to list custom_attributes for vm? #385

Closed dk-tgz closed 1 year ago

dk-tgz commented 1 year ago

Is your feature request related to a problem? Please describe.

I'm looking for a way to retrieve and edit custom attributes for a given VM. I can't find it now. Is it even possible?

Describe the solution you'd like

custom_attributes could be added to vsphere_client.vcenter.vm or vsphere_client.vcenter.vm.guest

Describe alternatives you've considered

No response

Additional context

No response

mtsvetanov commented 1 year ago

You can't do this with the vsphere-automation-sdk-python. You need to use the vSphere Web Services API for example using pyvmomi

Or using the VI/JSON API by crafting the HTTP/REST request, but this is only available since 8.0 Update 1.