Using vSphere Client
Common Method to place an ESX host into maintenance mode is via the vSphere client. Connect to ESX by using the vSphere Client direct connection to ESX host or by connecting to the vCenter Server.
Right Click the ESX host and Select “Enter Maintenance Mode” to enter.
Using Service Console
There are 2 different commands in the service console can be used to place the ESX host in maintenance mode.
vmware-vim-cmd
Command to place the ESX host in maintenance mode using vmware-vim-cmd
[root@vmware-arena ~]# vmware-vim-cmd /hostsvc/maintenance_mode_enter
Command to verify the host entered into maintenance mode
[root@vmware-arena ~]# vmware-vim-cmd hostsvc/hostsummary|grep –i maintenance
You can see the output similar to the above one “inMaintenanceMode = true,” to confirm the host entered into maintenance mode
Command to exit the ESX host from maintenance mode using vmware-vim-cmd
[root@vmware-arena ~]# vmware-vim-cmd /hostsvc/maintenance_mode_exit
Command to verify the host exited from maintenance mode
[root@vmware-arena ~]# vmware-vim-cmd hostsvc/hostsummary|grep –i maintenance
You can see the output similar to the above one “inMaintenanceMode = false,” to confirm the host entered into maintenance mode