ESXi Host May Unexpectedly Exit Maintenance Mode After Reboot During Patching, Upgrades, or VIB Operations
search cancel

ESXi Host May Unexpectedly Exit Maintenance Mode After Reboot During Patching, Upgrades, or VIB Operations

book

Article ID: 409947

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • An ESXi host may not retain its maintenance mode state across a reboot if patching, upgrading, or VIB installation, update, or removal is executed prior to enabling maintenance mode.

  • An ESXi host is placed into maintenance mode for planned maintenance activities.

  • A Patch/VIB install, removal or update operation is performed before the host enters maintenance mode.

  • The host is rebooted after the VIB removal.

  • Upon restart, the host exits maintenance mode automatically.

Environment

VMware vSphere ESXi

Cause

  • This behavior occurs due to how ESXi manages configuration states across the bootbank and altbootbank partitions during VIB operations and subsequent reboots.

  • When a VIB is removed while the host is in normal mode, the altbootbank partition records the current operational state (normal mode). If the host is later placed into maintenance mode, this updated state is recorded only in the active bootbank and not in the altbootbank.

  • Upon reboot, the altbootbank is promoted to become the active bootbank. Since the altbootbank still reflects the normal mode state at the time of the VIB removal, the host starts in normal mode rather than maintenance mode.

Resolution

To prevent this behavior, follow these operational best practices:

  • Place ESXi Host in Maintenance Mode Before VIB Operations

    • Always ensure the host is in maintenance mode before performing any VIB removal, update, or installation.

  • Check Maintenance Mode Status Before performing any such patching/update/upgrade activity

  • Using vSphere Client UI:

    • Navigate to the Hosts and Clusters view in vSphere Client.
    • Select the ESXi host.
    • Check the Summary tab → Maintenance Mode field to confirm whether the host is in maintenance mode.

  • Using ESXi CLI:

    • Connect to the ESXi host via SSH.
    • Run the following command:vim-cmd hostsvc/hostsummary | grep inMaintenanceMode
      Sample Output:
      
      true → Host is in maintenance mode.
      
      false → Host is in normal mode.
  • It is recommended to use vLCM workflows as they maintain state consistency across partitions automatically in case of update/upgrade based activity.

Additional Information

This behavior occurs because the altbootbank, which records the operational state at the time of VIB removal, is promoted to bootbank during the next reboot. If maintenance mode is entered after the VIB removal, this state change is not replicated to the altbootbank and is lost when partitions are swapped.

Following the recommended sequence ensures the correct operational state is preserved across reboots, preventing unexpected exits from maintenance mode.