To work around this issue, enable Lockdown Mode to make it consistent with vCenter Server and then disable Lockdown Mode through vCenter Server.
To enable Lockdown Mode from the DCUI:
- Log in directly to the ESXi host.
- Open DCUI on the host.
- Press F2 for Initial Setup.
- Toggle to Configure Lockdown Mode setting.
To enable Lockdown Mode from the ESXi command line:
Check if Lockdown Mode is enabled, run the command:
vim-cmd -U dcui vimsvc/auth/lockdown_is_enabled
- To enable Lockdown Mode:
Run the command:
vim-cmd -U dcui vimsvc/auth/lockdown_mode_enter
- To enable Lockdown Mode from the PowerCLI:
Run the command:
(get-vmhost hostname | get-view).EnterLockdownMode() get-vmhost | select Name,@{N="LockDown";E={$_.Extensiondata.Config.adminDisabled}} | ft -auto Name LockDown
Note: If Lockdown Mode is disabled in DCUI, running the PowerCLI command creates a task in vCenter Server. However, the task can fail with the message:
The Administrator permission is already disabled on the host (Except for the vim user)