My esxupdate script

I was having problems using update manager on an esx box at a remote site. I needed to install several prerequisite patches before i could get to U5.
I went to : http://www.vmware.com/patch/download/ and found the patches I needed.

So I used lwp-download to download the files(esx does not have wget) like so:

lwp-download http://download3.vmware.com/software/vi/ESX350-200911210-UG.zip
lwp-download http://download3.vmware.com/software/vi/ESX350-200911211-UG.zip
lwp-download http://download3.vmware.com/software/vi/ESX350-200911212-UG.zip
lwp-download http://download3.vmware.com/software/vi/ESX350-200911214-UG.zip
lwp-download http://download3.vmware.com/software/vi/ESX350-200911215-UG.zip
lwp-download http://download3.vmware.com/software/vi/ESX350-200911217-UG.zip
lwp-download http://download3.vmware.com/software/vi/ESX350-200911219-UG.zip
lwp-download http://download3.vmware.com/software/vi/ESX350-200911221-UG.zip
lwp-download http://download3.vmware.com/software/vi/ESX350-200911222-UG.zip
lwp-download http://download3.vmware.com/software/vi/ESX350-200911223-UG.zip

Then I used the following simple bash script:

for i in ESX350-2009*.zip
do
unzip $i
mv {,_}$i
cd ${i%%.*}/
esxupdate --noreboot update
cd /back/to/location/of/patches
mv {,_}${i%%.*}/
done

,

Comments are closed.