VMware Cloud Community
harppa
Contributor
Contributor
Jump to solution

vCenter read-only user and pyVmomi

Hi

I'm implementing a Python application for monitoring VM resource usage with pyVmomi. The application needs to read values like memory / disk usage.

Because the password must be stored somehow, I'd like to use a read-only account for accessing the API. However, if I create a user to vCenter domain "vsphere.local" with "Read-only" role, pyVmomi connect.SmartConnect throws a MethodFault "Permission to perform this operation was denied."

Is it possible to create a read-only account for this purpose? How?

Kind regards,

Harri

1 Solution

Accepted Solutions
Lalegre
Virtuoso
Virtuoso
Jump to solution

Hey harppa​,

Never used pyVmomi, but try to specify that same permission from Global Permissions in vCenter and choose propagate to all children. See if that works.

View solution in original post

0 Kudos
3 Replies
Lalegre
Virtuoso
Virtuoso
Jump to solution

Hey harppa​,

Never used pyVmomi, but try to specify that same permission from Global Permissions in vCenter and choose propagate to all children. See if that works.

0 Kudos
harppa
Contributor
Contributor
Jump to solution

"[x] Propagate to children" in the permission properties did the job. Thanks a lot Lalegre​!

Lalegre
Virtuoso
Virtuoso
Jump to solution

Glad it worked! You are welcome :smileygrin:

0 Kudos