Place an ESX Host into maintenance mode using the command line.

2010 May 24
by Paul McSharry

To enter maintenance mode using the command line interface,

vimsh -n -e /hostsvc/maintenance_mode_enter

To exit maintenance mode use

vimsh -n -e /hostsvc/maintenance_mode_exit

2 Responses leave one →
  1. Oscar permalink
    September 6, 2010

    Thanks for the tip.

    I alternatively use vmware-vim-cmd instead of vimsh, so those commands would look like:

    vmware-vim-cmd /hostsvc/maintenance_mode_enter

    and

    vmware-vim-cmd /hostsvc/maintenance_mode_exit

    And to check if a host is already in maintenance mode:

    vmware-vim-cmd hostsvc/hostsummary|grep -i maintenance

    output should be something like:

    inMaintenanceMode = false,

    Cheers

Trackbacks and Pingbacks

  1. Technology Short Take #2 - blog.scottlowe.org - The weblog of an IT pro specializing in virtualization, storage, and servers

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS