Friday, July 6, 2007

Here's my VMware ESX 3 Server Patch Process

Download Patches:
  • Find new patches from VMWARE.com -> Downloads -> ESX 3.X.X
    ( only download patches for current version of ESX Server )
  • Download all Patches available for current version
  • Using WinSCP upload all patches to /tmp on esx server

Create List of updates and order to be applied:

Create a text file installorder.txt in the /tmp folder with the order to install patches. Install them in order by release date from oldest to newest. Add files in order to be installed from top to bottom with the patch names (without the .tgz at the end)

cd /tmp
vi installorder.txt

--------------------------------------

ESX-5140477
ESX-5095559
ESX-4825991

--------------------------------------

Create the following shell script:

cd /tmp
vi esxpatches.sh

--------------------------------------
!#/bin/sh
# ESX Patch Script

for x in `cat installorder.txt`
do
tar -zxvf $x.tgz

cd ./$x

esxupdate -n update
cd ..
done

--------------------------------------

Set permissions on the shell script

chmod /tmp/esxpatches.sh 777

Using the Virtual Infrastructure Client:

  • Move all VM’s to ESX Server you are not patching.
  • Put the ESX Server in Maintenance Mode.
Run the patch update script

./esxpatches.sh

Using the Virtual Infrastructure Client:

  • Reboot newly patched VMWare ESX Server
  • Exit Maintenance Mode
  • Slowly Move VM’s back to newly patched ESX Server

1 comment:

  1. Hey man, cool. I'll have to do that over here as soon as I get a chance! I'm glad you wrote this all down.

    ReplyDelete