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
- Open vSphere Client (direct to ESXi or through vCenter).
- Right-click the ESXi host → Enter Maintenance Mode.
- VMs are automatically migrated or powered off.
- 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:
bashesxcli <conn_options> system maintenanceMode set --enable true
esxcli <conn_options> system maintenanceMode set --enable false
Replace <conn_options> 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
bashvmware-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
bashvimsh -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
- VMware Security Best Practices – tune ESXi firewalls and network isolation
- Server & Network Maintenance Checklist – integrate ESXi maintenance into your routine
- Server Room Maintenance Tasks – ensure your physical setup complements virtual care
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.
