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
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.
found it, in the roles, global, settings
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.