We have been getting alerts on memory usage from the Prism Central VM. It seems to be a known issue. So to suppress the alerts from repeatedly generating cases in our internal ticketing system I am working on setting up an automated restart when memory usage gets to 90%.
I’ve written the code to do this (a mix of the Nutanix cmdlets and Rest API calls in PowerShell). It works fine when run under my own account. My account has the ‘User Admin’ role. I should also mention we map roles to AD groups.
However I wish to move the scheduled job to run under the context of a service account. The service account has been assigned a Custom Role with a single assignment ‘Update VM Power State’
I’m added the Role to my Service account user and applied it to the Prism VM (and a Test VM).
I’m wondering if I need to grant more permissions as I am getting an error
Access is denied
Set-NTNXVMPowerState : The remote server returned an error: (403) Forbidden.