Failed to power on virtual machine <VMname>. The operation is not allowed in the current state. Click here for more details.
search cancel

Failed to power on virtual machine <VMname>. The operation is not allowed in the current state. Click here for more details.

book

Article ID: 376378

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This resource provides a guide to identify symptoms and align them with solutions to resolve the failure of virtual machines to power on/VM power-on issues.

Symptoms:

When attempting to start up a virtual machine (VM), it fails to power on with the above error .

The power On/Off are grayed out  .

The following is seen in the vSphere host UI .

The following error is seen on the vCenter .

When clicking on the console of the virtual machine the following error is seen :

 

When trying to power on a VM from cli :

#vim-cmd vmsvc/power.on 5
Powering on VM:
Power on failed: (vim.fault.InvalidState) {
   faultCause = (vmodl.MethodFault) null,
   faultMessage = <unset>
   msg = "The operation is not allowed in the current state."
}

 

Environment

VMware vSphere ESXi 6.x
VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x

Cause

This issue is caused when trying to power on a virtual machine when the host is in Maintenance Mode .

Resolution

Please check and validate if the ESXi host is in Maintenance Mode .

To verify if the host is in Maintenance Mode use one of the following methods:

1.Run one of these commands to verify if the host was in Maintenance Mode:

        vim-cmd /hostsvc/hostsummary | grep inMaintenanceMode
        vimsh -n -e /hostsvc/hostsummary | grep inMaintenanceMode
        esxcli system maintenanceMode get

2.Check if the host is in Maintenance Mode from vcenter : 

-Open the vSphere Web Client: Log in to your vCenter Server using the vSphere Web Client (Flex/Flash interface).
-Navigate to Hosts and Clusters: Click on “Hosts and Clusters” from the Home menu.
-Select the Host: Click on the ESXi host you want to check.
-Check the Host’s Summary:
In the “Summary” tab of the host, you’ll find the “Maintenance Mode” status. This will indicate if the host is currently in maintenance mode.

3.Using the ESXi Embedded Host Client (HTML5 Interface)


-Log In to the Host:
-Open a web browser and enter the IP address or hostname of the ESXi host in the address bar (e.g., https://<esxi-host-ip-or-name>/ui).
-Log in with your root credentials.
-Once logged in, you will see the ESXi Embedded Host Client interface.
-Click on the “Host” option in the left navigation pane if it's not already selected.
-In the main pane, several tabs such as “Summary,” “Monitor,” “Manage,” etc are shown.
Click on the “Summary” tab.
-Look for the “Maintenance Mode” section. The UI will indicate whether the host is in maintenance mode or not. If it’s in maintenance mode, it will explicitly show “Maintenance Mode” or provide an appropriate status message.

If the host is in Maintenance Mode follow one of the below procedures to exit the maintenance mode:

  1. To exit maintenance mode, run the following command.
esxcli <conn_options> system maintenanceMode set --enable false

Note :
 
If attempting to exit maintenance mode when the host is no longer in maintenance mode, an error advises that maintenance mode is already disabled.
 

    2. Using the vSphere Client :

-Open the vSphere Client: Log in to your vCenter Server using the vSphere Client.
-Go to Hosts and Clusters: In the left-hand navigation pane, select "Hosts and Clusters."
-Select the Host: Click on the ESXi host that you want to exit maintenance mode.
Click on the "Host" tab.
-In the "Actions" menu (located at the top-right of the pane), select "Maintenance Mode" and then click on "Exit Maintenance Mode."

Following these steps will allow the ESX host to exit maintenance mode on an ESXi host through vCenter.

   3. Open the ESXi Host Client:
 
-Open a web browser and enter the IP address or hostname of your ESXi host in the address bar (e.g., https://<esxi-host-ip-or-name>/ui).
-Log in as root user .
-Navigate to the Host’s Summary Page.
-Once logged in, the ESXi Host Client interface is available.
-Click on “Host” in the left-hand navigation pane if it is not already selected.
-Then click on actions ,
-Under Actions ,Navigate to "Exit Maintenance Mode." 

 

Additional Information

Refarence Documents :

Enter and Exit Maintenance Mode with ESXCLI .

https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere-sdks-tools/8-0/esxcli-concepts-and-examples/managing-hosts/enter-and-exit-maintenance-mode-with-esxcli.html