Monday, November 10, 2008

Time for Maintenance

ESX Maintenance Mode.. this mode is important for applying the all important updates. This can be done easily via Virtual Center but in the event you need to patch oh I don't know.. 40+ ESX hosts in an automated fashon this can be a pain in the rear.

My new best friend is VIMSH. The vimsh can be used to process many thing on the command line of the console of an ESX server. The details can be found in this doc..Here.



An example of the code I am going to use is:



vimsh -n -e hostsvc/maintenance_mode_enter

vimsh -n -e hostsvc/maintenance_mode_exit



Running vimsh --help shows that the "-n" runs the command in non-interactive mode and the "-e" runs the commands specifed. THIS IS COOL! Now I can set up the Opsware client to place an ESX host into maintence mode, patch it, reboot it, and then exit maintence mode.



Whoo Hoo! Its a great day to be a Geek!

No comments: