Host shutdown via vSphere alarm action fails with "vim.fault.InvalidState" when host is not in maintenance mode
search cancel

Host shutdown via vSphere alarm action fails with "vim.fault.InvalidState" when host is not in maintenance mode

book

Article ID: 450731

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

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:
--> false

Environment

VMware vCenter Server 8.0

Cause

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.

Resolution

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.

Additional Information

Get-AlarmDefinition