Skip navigation
VMware
17,759 Views 36 Replies Last post: Nov 5, 2009 9:24 PM by Hiney RSS Branched to a new discussion.
1 2 3 Previous Next
jasonboche Champion vExpert 6,072 posts since
Jan 7, 2004
Currently Being Moderated

May 11, 2007 7:53 PM

esxupdate patch script

As discussed at the 3/9 VMUG meeting, how to automate ESX patches using esxupdate and a patch repository FTP or WEB server.  The following script example uses a WEB server.

 

Patches should be installed in order by month released (ie. First January, then February, March, etc.).  For that reason, I prefer to group patches on the repository server by release date.

There should be no running VMs on the host prior to patching or patching may fail.

 

esxcfg-firewall -allowOutgoing

esxupdate --noreboot -r http:///esxupdate/03-29-07/ESX-9916286 update

esxcfg-firewall -blockOutgoing

 

Reboot after patching is complete

 

Also see the following URL for a specific issue to watch out for when using IIS as a repository server:  http://www.vmware.com/community/message.jspa?messageID=595628#595628

 

Message was edited by:

        jasonboche

     

I added the 3/29 patches to the script

kix1979 Champion 3,769 posts since
Oct 14, 2004
Currently Being Moderated
1. Mar 12, 2007 6:49 PM in response to: jasonboche
Re: esxupdate patch script
Thomas H. Bryant III Director, Advanced Technology & Products [Vizioncore, Inc.|http://www.vizioncore.com] VMware Communities User Moderator
kix1979 Champion 3,769 posts since
Oct 14, 2004
Currently Being Moderated
3. Mar 13, 2007 6:24 AM in response to: jasonboche
Re: esxupdate patch script

Good point, wild cards = scary.

Thomas H. Bryant III Director, Advanced Technology & Products [Vizioncore, Inc.|http://www.vizioncore.com] VMware Communities User Moderator
ctyke Lurker 2 posts since
Mar 13, 2007
Currently Being Moderated
4. Mar 13, 2007 6:42 AM in response to: jasonboche
Re: esxupdate patch script

Here is the script I had in my Power Point, it uses FTP insted of http, of course change the path to point at your ftp server.

 

esxcfg-firewall -allowOutgoing

 

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-1271657 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-1917602 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-2031037 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-2092658 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-3996003 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-5497987 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-6075798 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-2066306 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-6921838 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-8173580 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-9986131 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-1006511 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-1410076 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-2158032 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-3199476 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-5031800 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-5885387 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-6050503 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-6856573 update

esxupdate --noreboot --force -r ftp://192.168.16.200/vmware/updates/ESX-9865995 update

esxcfg-firewall -blockOutgoing

 

Message was edited by:

        ctyke

chris.trevino Lurker 2 posts since
May 25, 2006
Currently Being Moderated
5. Mar 13, 2007 7:09 AM in response to: ctyke
Re: esxupdate patch script

A couple of questions:

 

1) where in the start up order to you put the script? s99xxxxx ?

2) do you gracefully shutdown the VMs first - just in case?

3) was there a particular reason that you used the FORCE option?

4) are you applying all of the patches just in case? many of them are to address very specific issues.

 

Thanks.

ctyke Lurker 2 posts since
Mar 13, 2007
Currently Being Moderated
8. Mar 13, 2007 8:31 AM in response to: jasonboche
Re: esxupdate patch script

We used the force option because some of the patches didn't take. We found this option recommended in some of the forums.

BrianG Champion VMware Employees 3,668 posts since
Oct 31, 2005
Currently Being Moderated
10. Mar 13, 2007 12:51 PM in response to: jasonboche
Re: esxupdate patch script

One thing you want to make sure is to keep the patch order in line with their release dates: especially when patch filenames are not sequential and when you use Re: esxupdate patch scriptforce[/b] option. If you don't consider this, then you will end up overwriting newer rpm with older version.

 

ESX-3199476.tgz (New) and ESX-6075798.tgz (old) is a good example. They both have updated VMware tools ISO files and if you just go with file name and force option while applying all patches at once, you will overwrite newer tools with older version. Without force option esxupdate will not downgrade a patch.

BrianG Champion VMware Employees 3,668 posts since
Oct 31, 2005
Currently Being Moderated
12. Mar 13, 2007 2:23 PM in response to: jasonboche
Re: esxupdate patch script

Sounds right.

 

My point was just to say use -force with caution.

 

I would not force a patch as a default action.

 

Like you said, I would want to know if a patch install failed and determine why instead of just forcing blindly.

HennITLS Enthusiast 50 posts since
Aug 3, 2006
Currently Being Moderated
13. Mar 13, 2007 2:36 PM in response to: jasonboche
Re: esxupdate patch script

Jason,

 

I have a very nu-bee question to this ftp depot patching procedure. Does the "ESX-#######" refer to the folder created after tar'ing the .tgz file and the esxupdate knows that it needs to go in there to find the update?

 

esxupdate --noreboot -r http:///esxupdate/11-30-06/[b]ESX-1006511[/b] update

BrianG Champion VMware Employees 3,668 posts since
Oct 31, 2005
Currently Being Moderated
14. Mar 13, 2007 2:51 PM in response to: HennITLS
Re: esxupdate patch script

/esxupdate/11-30-06/ ESX-1006511

 

In the above example, if the ESX-1006511.tgz file was put in the esxupdate/11-30-06 directory and untared it would have created the directory ESX-1006511 under it with the rpm(s) in it.

 

Else the file could have been untared elsewhere and the files could have been copied to the esxupdate/11-30-06/ ESX-1006511 directory.

Bookmarked By (0)

Share This Page

Communities