VMware vSphere | ESXi Host | Managing Maintenance Mode with SSH Commands
Hello Techies! Welcome to Says Tech !
In this blog, we will be understand the procedure of managing host's maintenance mode with the help of SSH commands
Description:
Entering or exiting a host to & from maintenance mode is quite easy task by vSphere Web Client, you just need to right click on the host --> choose whether to enter or exit from the maintenance.
Requirement:
Sometimes, if web client isn't available or encountered any issue or you have to work on cli or ssh console, then you can use commands to perform this task.
Suggestions:
You can either use ESXCLI or VIM-CMD to perform operations for entering or exiting host's maintenance mode.
Steps Involved:
1. If you are using ESXCLI, then type below command on the SSH console
For entering into maintenance mode:
esxcli system maintenanceMode set --enable true
esxcli system maintenanceMode set --enable false
2. If you are using VIM-CMD, type below command:
For entering:
vim-cmd /hostsvc/maintenance_mode_enter
vim-cmd /hostsvc/maintenance_mode_exit
Bonus:
To check host's maintenance mode status via command, please use below string:
vim-cmd /hostsvc/hostsummary | grep inMaintenanceMode
Enjoy !
Thanks,
Arvind Kr.
Please do share or comment if you find this suitable and workable for you !
ReplyDeleteThis is what I am searching, thanks
ReplyDeleteThanks worked for me!
ReplyDelete