When a host shutdown action is triggered by a vSphere alarm, the task fails if the target ESXi host is not in maintenance mode.
The vpxd.log displays errors similar to:
error vpxd[####] [Originator@6876 sub=Default opID=####] [VpxLRO] -- ERROR task-#### -- #### -- host-#### -- vim.HostSystem.shutdown: :vim.fault.InvalidState
--> Result:
--> (vim.fault.InvalidState) {
--> faultCause = (vmodl.MethodFault) null,
--> faultMessage = <unset>
--> msg = ""
--> }
--> Args:
--> Arg force:
--> falseVMware vCenter Server 8.0
By default, the force parameter for the host shutdown alarm action is set to false. When force is set to false, ESXi rejects the shutdown request unless the host is already in maintenance mode.
The force parameter value cannot be viewed or modified directly from the vSphere Client UI.
To allow an alarm action to shut down a host that is not in maintenance mode, use PowerCLI to modify the alarm definition and update the force parameter to true.