VMware {code} Community
tikondrus
Enthusiast
Enthusiast
Jump to solution

which credentials do I need to run $esxcli.nvme.device.list.Invoke()?

 which credentials do I need to run $esxcli.nvme.device.list.Invoke()?

LockdownMode is disabled on all hosts.

$esxcli = get-esxcli -V2 -vmhost $vmhost
$devices = $esxcli.nvme.device.list.Invoke()
Permission to perform this operation was denied.
At line:2 char:5
+ $devices = $esxcli.nvme.device.list.Invoke()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], NoPermission
+ FullyQualifiedErrorId : VMware.VimAutomation.ViCore.Types.V1.ErrorHandling.NoPermission

Reply
0 Kudos
1 Solution

Accepted Solutions
VCPJOHN20111014
Enthusiast
Enthusiast
Jump to solution

found it, in the roles, global, settings

 

View solution in original post

Reply
0 Kudos
3 Replies
VCPJOHN20111014
Enthusiast
Enthusiast
Jump to solution

did you figure this out?  I'm having same issue.  Trying to use a read only account isn't enough, trying not to use administrator.

Reply
0 Kudos
VCPJOHN20111014
Enthusiast
Enthusiast
Jump to solution

found it, in the roles, global, settings

 

Reply
0 Kudos
tikondrus
Enthusiast
Enthusiast
Jump to solution

 

I added Host > CIM > CIM interaction

host > Configuration > Query patch

Global > Diagnostic

and it didn't change the situation. But adding

Global > settings

really helps.  This kind of access allow not only   reading but  modifying runtime vCenter Server configuration settings.

https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.security.doc/GUID-AD9A8245-E5AA-462...

Reply
0 Kudos