How to Place an ESXi Host into Maintenance Mode – Complete Guide –


Table of Contents

Introduction

When it’s time for hardware upgrades, patches, or troubleshooting, placing an ESXi host into maintenance mode is essential. This ensures virtual machines are migrated or shut down gracefully, preventing disruption. In this guide, we’ll walk through three methods: vSphere Client, ESXCLI, and Service Console, while linking to related Supertechman resources.


1. Method 1: vSphere Client

  1. Open vSphere Client (direct to ESXi or through vCenter).
  2. Right-click the ESXi host → Enter Maintenance Mode.
  3. VMs are automatically migrated or powered off.
  4. To exit, right-click → Exit Maintenance Mode.

🔗 Internal link: Want to improve host security once in maintenance? Check out our VMware Security Best Practices.


2. Method 2: ESXCLI

Prefer the command-line? Try ESXCLI:

bash
esxcli system maintenanceMode set --enable true
esxcli system maintenanceMode set --enable false

Replace with your connection flags.
❗Error message appears if you try to exit when not in maintenance mode.

For managing host lifecycles and lifecycle manager, see our expanded post on Server and Network Maintenance Checklist.


3. Method 3: Service Console

A. vmware‑vim‑cmd

bash
vmware-vim-cmd /hostsvc/maintenance_mode_enter
vmware-vim-cmd hostsvc/hostsummary | grep -i maintenance
vmware-vim-cmd /hostsvc/maintenance_mode_exit
vmware-vim-cmd hostsvc/hostsummary | grep -i maintenance

Look for in MaintenanceMode = true/false.

B. vimsh

bash
vimsh -n -e /hostsvc/maintenance_mode_enter
vimsh -n -e /hostsvc/maintenance_mode_exit

Best Practice Tips

  • Always confirm all VMs are migrated or powered off before entering mode.
  • Don’t deploy new VMs during maintenance mode — ESXi blocks it.
  • For stuck hosts, Broadcom recommends restarting host management agents or using vim-cmd /hostsvc/maintenance_mode_exit

Lifecycle Management

When patching or upgrading multiple hosts, use vSphere Lifecycle Manager (vLCM). It minimizes downtime by staging patches before remediation


Related Supertechman Resources


Conclusion

Whether you prefer a GUI, scripts, or the command line, managing maintenance mode is a core ESXi task. Use the method that fits your environment and ensure you follow best practices — especially with vLCM and security in mind.



Share this content:

I am a passionate blogger with extensive experience in web design. As a seasoned YouTube SEO expert, I have helped numerous creators optimize their content for maximum visibility.

Leave a Comment