VMware Cloud Community
eaphilipp
Contributor
Contributor
Jump to solution

vSphere 6 host connections

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?

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Oops, missed that.

What lockdown mode is the ESXi in ? See KB1008077


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
7 Replies
LucD
Leadership
Leadership
Jump to solution

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

0 Kudos
eaphilipp
Contributor
Contributor
Jump to solution

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.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Oops, missed that.

What lockdown mode is the ESXi in ? See KB1008077


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
eaphilipp
Contributor
Contributor
Jump to solution

yup, that was it. I disabled lockdown mode to run the script and it worked great. Thanks for the help as always.

0 Kudos
AmoghMaheshvip
Enthusiast
Enthusiast
Jump to solution

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 ?

0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

0 Kudos
AmoghMaheshvip
Enthusiast
Enthusiast
Jump to solution

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 ]

0 Kudos