Many important VMware-related tips will take you from vCenter to the console. Along with other things in this chapter, we’ll examine some important command-line utilities that will aid you in monitoring and configuring your ESX Server, and we’ll take a look at general best practices for setting up services that will be crucial to your ESX Server.
You are unable to access your vCenter GUI and you want to put your ESX Server into maintenance mode.
Log into your ESX host via SSH or directly from the console.
To enter maintenance mode, use this command:
vimsh -n -e /hostsvc/maintenance_mode_enter
To exit maintenance mode, enter:
vimsh -n -e /hostsvc/maintenance_mode_exit
These commands are undocumented and unsupported by VMware. However, they work correctly in ESX 3.x. Alternatively, you can use the VI Perl ToolKit to initiate maintenance mode via the API provided by VMware.
You want to display current information about your ESX Server.
on the ESX Server.
This command-line tool is a powerful yet simple way to find out
about your ESX Server and its environment. By using the
esxcfg-info command, you can get detailed
information about your configuration and server hardware:
esxcfg-info -hUsage: esxcfg-info mode -a, --all Print all information -w, --hardware Print hardware information -r, --resource ...