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

            For exiting from maintenance mode:
                    esxcli system maintenanceMode set --enable false

2. If you are using VIM-CMD, type below command:
            For entering:
                    vim-cmd /hostsvc/maintenance_mode_enter

            For exiting:
                    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.

Comments

  1. Please do share or comment if you find this suitable and workable for you !

    ReplyDelete
  2. This is what I am searching, thanks

    ReplyDelete

Post a Comment

Popular posts from this blog

VMware vSphere | ESXi Host | Namespace error while entering host into Maintenance

Nutanix | CVM | Host Upgrade | Kill Stuck Task

VMware vSphere | ESXi Upgrade | Software or system configuration of host is incompatible