Hi Everyone,
We are moving down the vSphere 6 road. We are building hosts and vCenter. I have a post install script that I run to do various post install things and when it runs the first thing it does is connect to the host via connect-viserver to the host in questions and connects via the root usename and password. This failed with an error: Permission to perform this operation was denied. Required privilege 'System.View' on managed object with id 'Folder-ha-folder-root'
I have never seen this before and I am not sure what to do?
thoughts?
Oops, missed that.
What lockdown mode is the ESXi in ? See KB1008077
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
It looks as if the Role assigned to the account with which you connect doesn't have this Privilege.
Which Role is assigned to your account ?
And are the Permissions for that account set correctly (in the root of the vCenter) ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I am trying to connect directly to the vSphere host using Root as the username:
connect-viserver -server ESX6_1 -user root -password xxxxxxxx
this has always worked for me.
Oops, missed that.
What lockdown mode is the ESXi in ? See KB1008077
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
yup, that was it. I disabled lockdown mode to run the script and it worked great. Thanks for the help as always.
What role should be assigned to user except Administrator to avoid this error.
Connect-VIServer : Connect-VIServer Permission to perform this operation was denied. Required privilege 'System.View' on managed object with id 'Folder-ha-folder-root'
I am trying to create a user who has access connect to ESXi and vCenter using Connect-VIServer, get statistics of hosts and virtual machines using Get-Stat, should be able to Start, Suspend, Stop virtual machines using Get-VM vm | Start-Vm / Stop-VM / Suspend-VM.
Does only Administrator has this privileges, can a custom created user have this privileges also ?
No, you can go another role than Administrator.
You can in fact create your own role with just the privileges that are required.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Can you please specify the roles and privileges required for the above requirement. Thank You.
Because the privileges that i tried to give did not fulfill my requirement. [ connect to ESXi and vCenter using Connect-VIServer, get statistics of hosts and virtual machines using Get-Stat, should be able to Start, Suspend, Stop virtual machines using Get-VM vm | Start-Vm / Stop-VM / Suspend-VM ]