Exiting hung maintenance mode on an ESXi host
search cancel

Exiting hung maintenance mode on an ESXi host

book

Article ID: 337174

calendar_today

Updated On: 04-17-2025

Products

VMware vSphere ESXi

Issue/Introduction

The host is unable to exit Maintenance Mode as the task is stuck.

Environment

VMware ESXi 7.x

VMware ESXi 8.x

Resolution

Determine if the ESXi host is currently in maintenance mode:

  1. Access the ESXi host shell. See Using ESXi Shell in ESXi
  2. Run vim-cmd /hostsvc/hostsummary | grep inMaintenanceMode

To exit from a hung maintenance mode, try one of these 4 options:

  1. Log into the ESXi host UI as the root user and select exit maintenance mode.
  2. Restart the vSphere Web Client (vsphere-client). See Stopping, Starting or Restarting appliance services
  3. Exit maintenance mode:
    vim-cmd /hostsvc/maintenance_mode_exit
  4. Restart the management agents on the host. See Restarting the Management agents on an ESX or ESXi Server (1003490).

Additional Information

If ESXI is part of vSAN Cluster and vSAN health check reports host is in maintenance mode, we recommend to engage Technical Support Team, however you can try steps below to exit host from maintenance mode:

  • Run via command line: esxcli vsan cluster get
  • If MaintenanceMode is "ON"
    • Run command to exit host from maintenance mode: esxcli system maintenanceMode set -e false
    • Or From RVC navigate to host level, run the command: vsan.host_exit_evacuation

 

  • If MaintenanceMode with state (ENTERING) 
    • Run command to cancel maintenance mode progress: esxcli vsan maintenancemode cancel
  • If steps above does not resolve the issue, you can try the following: 
    • Make sure all virtual machine are migrated from host affected
    • Login to ESXI host (web client) and EXIT host from maintenance mode
    • If web client does not help, restart vSAN service on host affected:
      • /etc/init.d/vpxa restart
      • /etc/init.d/hostd restart
      • /etc/init.d/vsanmgmtd restart
    • After restarting service try same steps above to exit host from maintenance mode