1 3 4 5 6 7 Previous Next 104 Replies Latest reply on Jan 9, 2008 8:35 AM by jlmale0 Go to original post
      • 90. Re: More ESX 3.0.1 03/05/07 Patches......
        VirtualKenneth Master
        vExpert

        I've changed it into:

         

         

        • 91. Re: More ESX 3.0.1 03/05/07 Patches......
          dropadrop Enthusiast

          I wish I would have noticed this thread earlier, but now I did this in a more ghetto way... I guess I could list it here, since it still works fine:

           

          I downloaded untared all the updates (into a new folder):

           

          for PACKAGE in *; do

             tar -xzvf $PACKAGE

          done

          rm *.tgz

          /code

           

          I made a text file containing all the names of the updates in the order they have been released by vmware. I called the file patch_list and put it in the same folder as the extracted updates (here's the current content of my list):

           

          ESX-2158032

          ESX-1410076

          ESX-1006511

          ESX-9986131

          ESX-8173580

          ESX-6921838

          ESX-2066306

          ESX-6075798

          ESX-5497987

          ESX-3996003

          ESX-2092658

          ESX-2031037

          ESX-1917602

          ESX-1271657

          ESX-9865995

          ESX-6856573

          ESX-6050503

          ESX-5885387

          ESX-5031800

          ESX-3199476

          ESX-9916286

          ESX-6431040

          ESX-2559638

          ESX-2257739

          ESX-1541239

          /code

           

          Then I wrote a small script which will go through the list and install mentioned updates one by one. It worked for all but one update, since that was a package containing several other updates (ESX-6431040). It's now updated so it installs everything, but the annoying package will ask you questions.

           

          #! /bin/bash

          \# I install vmware esx-server updates

          for PATCH in `cat patch_list `; do

             cd "$PATCH"

             esxupdate -v 20 -n update

             ./install_patches

             cd ..;

          done

          reboot

          /code

           

          It would be a lot more elegant if it was not for ESX-6431040 which is installed differently (with the ./install_patches command). Now it tries esxupdate and ./install_patches in every folder, and one of them will work.

           

          The stupid thing is that ./install_patches asks questions, but it's still a lot less work. I packed the whole folder to a .tgz file so I can easily distribute it to a new esx host, and when new patches are released I can just add them to the end of the list and create a new package with them included.

          • 92. Re: More ESX 3.0.1 03/05/07 Patches......
            APPB-VM Lurker

            I followed the procedure exactly to apply all patches as instructed here:

            http://www.vmwire.com/index.php?option=com_content&task=view&id=39&Itemid=44

             

            Great process, but I've ran into one issue.  ESX-1410076 doesn't seem to want to apply.  It seems to be wanting to downgrade.  I've change the release date and tried again, but I got the same thing -- wanting to downgrade.

             

            Maybe I need to change the release date before applying ALL of the updates?  Problem is they are all showing up except for ESX-1410076?

             

            This is what I get when I run esxupate -l query

             

                     ESX-1006511    09:58:23 05/11/07 Fixing TX hang in 80003ES2LAN Controller

                     ESX-1161870    10:58:27 05/11/07 Several bug fixes in vmware-vmx.

                     ESX-1271657    10:11:52 05/11/07 Open IPMI improvement for slowness.

                     ESX-1541239    11:00:12 05/11/07 Updates Emulex Fibre Channel driver.

                     ESX-1917602    10:09:17 05/11/07 To improve compatibility for Windows NT.

                     ESX-2031037    10:08:33 05/11/07 To provide LUN an unique ID Name

                     ESX-2066306    10:02:21 05/11/07 Patch for VM crashes and possible freeze

                     ESX-2092658    10:07:50 05/11/07 SNMP agent returns full VM config file.

                     ESX-2158032    09:59:56 05/11/07 Add LFENCE for RWO on AMD K8 before RevF

                     ESX-2257739    11:01:46 05/11/07 To deliver several fixes in vmkernel.

                     ESX-2559638    11:02:29 05/11/07 Update info rpm for ESX 3.0.1.

                     ESX-3199476    10:15:06 05/11/07 VMXNET shutdown may lead to BSOD

                     ESX-3416571    10:57:40 05/11/07 Potential Buffer Overflow.

                     ESX-3996003    10:06:36 05/11/07 To support the latest time zone rules.

                     ESX-5011126    10:54:04 05/11/07 Potential Buffer Overflow.

                     ESX-5031800    10:14:10 05/11/07 RHSA-2006:0749 tar security update

                     ESX-5497987    10:10:56 05/11/07 Fixes a misleading locking message.

                     ESX-5885387    10:13:29 05/11/07 RedHat Moderate: gzip security update

                     ESX-6050503    10:19:15 05/11/07 Error on "network adapters" tab in VC UI

                     ESX-6075798    10:12:48 05/11/07 Force vmxnet module to be installed 1st.

                     ESX-6856573    10:19:59 05/11/07 PhysMem_Get() accesses wrong pages

                     ESX-6921838    10:04:55 05/11/07 hot removal of a virtual disk thru SDK

                     ESX-7737432    10:59:10 05/11/07 Potential Buffer Overflow.

                     ESX-7780490    10:56:55 05/11/07 Potential Buffer Overflow.

                     ESX-8173580    10:01:36 05/11/07 Fix COS Oops running Dell OM5 w/ QLogic

                     ESX-8174018    10:54:53 05/11/07 Potential Buffer Overflow.

                     ESX-8852210    11:05:13 05/11/07 Potential Buffer Overflow.

                     ESX-9617902    10:56:11 05/11/07 Potential Buffer Overflow.

                     ESX-9865995    10:16:39 05/11/07 LUNs of MSA Array disappear and reappear

                     ESX-9916286    10:20:57 05/11/07 To update zlib library for ESX 3.0.1

                     ESX-9986131    10:05:53 05/11/07 Updated openssh, python, and openssl

            • 93. Re: More ESX 3.0.1 03/05/07 Patches......
              VirtualKenneth Master
              vExpert

              Have you changed it the way I did?

                 

               

              Try to run the 1410076 patch as a standalone patch and chech the releasedate (when installed) using esxupdate query. Maybe something went wrong while repackaging.

              • 94. Re: More ESX 3.0.1 03/05/07 Patches......
                APPB-VM Lurker

                I had to run the 1410076 patch with the --force parameter and then re-run all of the patches (via update.sh script) again with the edited date in the 1410076 archive.  Once I did that my build number shows as 42829.

                • 96. Re: More ESX 3.0.1 03/05/07 Patches......
                  vmtechie Enthusiast

                  how do we excute this script? from the esx server?

                  • 97. Re: What can I be doing wrong
                    guser Enthusiast

                    Hi dominic7,

                     

                    Two questions...

                     

                    1) I have un-packed ESX-6431040 into the following:

                    022,ESX-1161870,b52a12657327c5b3ffba9c6655af881d

                    023,ESX-3416571,c95a291575c4e10530ce38b451bc5a26

                    024,ESX-5011126,6bd8b7be05cb8aa96180d1f3dd52bda6

                    025,ESX-7737432,fbba4c793fe4cdcd551f8741f67ef1f8

                    026,ESX-7780490,71b4a24068cd2206382c1e4a30696fce

                    027,ESX-8174018,e30f2fa07cf2c6b259463a0606d14d1c

                    028,ESX-8852210,0135da91b87cb01688c47940a05fb124

                    029,ESX-9617902,c4e6edb33cdd99da39bd2ec6c47bb20a

                    /code

                    ... ESX-6431040.tgz does not exist in my updates; Will your script deal with that?

                     

                     

                    2) Every time I download a patch, I have renamed it to include the order that VMware listed it and I include the md5sum.  For example.

                    001-ESX-2158032-c688275383addb789af1885ef4632b5f.tgz

                    /code

                    Will your script deal with this naming convention or do I have to modify something?

                     

                     

                    Thank you

                    /guser

                    • 98. Re: What can I be doing wrong
                      dominic7 Virtuoso

                      #1 should work ( provided that you repackage the updates into .tgz, or use one of the new options to not unpack updates ), #2 will break the script. You can edit the script if you want to deal with your naming convention. I'd suggest not renaming the packages if you want things to go smoother though.

                      • 99. Re: What can I be doing wrong
                        RobMokkink Expert

                        This is a script i use.

                        For the ESX-6431040 bundled patches i just copy over the patches to the webroot and install them seperately, but in the same order as the patch install script does.

                         

                        Here is my script:

                         

                         

                        #!/bin/bash

                         

                        #DECLARE VARIABLES

                        REPO_URL="http://192.168.0.105/vmware/patches/"

                        GET="/usr/bin/lwp-download"

                        INST_LIST="install.txt"

                        ESXUPDATE="/usr/sbin/esxupdate"

                        REBOOT="/sbin/shutdown -r now"

                        UPDATE_COUNT=0

                         

                         

                         

                        #FUNCTIONS

                        QUERY_UPDATE(){

                             $ESXUPDATE query | grep $UPDATE

                              

                             #CHECK IF INSTALLED

                             if \[ $? -eq 0 ]; then

                                  echo "$UPDATE IS ALREADY INSTALLED"

                             else

                              

                                  INSTALL_PATCH

                             fi

                        }

                         

                        INSTALL_PATCH(){

                              

                             $ESXUPDATE -v 30 -r $\{REPO_URL}$\{UPDATE} --noreboot update

                         

                                #ERROR HANDLING

                                if \[ $? -ne 0 ]; then

                                        echo "FAILED TO THE THE INSTALL $UPDATE"

                                        echo "SCRIPT WILL QUIT!"

                                  #RUN CLEANUP

                                  CLEANUP

                                        exit 192

                             else

                                  echo "INSTALLED UPDATE: $UPDATE"

                                  let UPDATE_COUNT=UPDATE_COUNT+1

                         

                                fi

                        }

                         

                        CLEANUP(){

                         

                             #REMOVE INSTALL FILE

                             rm -rf $INST_LIST

                         

                        }

                         

                        CHECK_REBOOT(){

                             if \[ $UPDATE_COUNT -eq 0 ]; then

                                  echo "THE NUMBER OF UPDATES INSTALLED IS: $UPDATE_COUNT"

                                  echo "NO UPDATES ARE INSTALLED NO REBOOT REQUIRED"

                             else

                                  echo "THE NUMBER OF UPDATES INSTALLED IS: $UPDATE_COUNT"

                                  echo "A REBOOT IS REQUIRED"

                                  sleep 20

                                  $REBOOT     

                             fi

                        }

                         

                         

                         

                         

                        #GET THE INSTALL LIST

                        $GET $\{REPO_URL}$\{INST_LIST}

                         

                             #ERROR HANDLING

                             if \[ $? -ne 0 ]; then

                                  echo "FAILED TO THE THE INSTALL LIST!"

                                  echo "SCRIPT WILL QUIT!"

                                  exit 192

                             fi

                         

                         

                        #READ THE INSTALL.TXT

                         

                        exec < $INST_LIST

                         

                             #ERROR HANDLING

                                if \[ $? -ne 0 ]; then

                                        echo "FAILED TO READ THE INSTALL LIST!"

                                        echo "SCRIPT WILL QUIT!"

                                  #RUN CLEANUP

                                        CLEANUP

                                        exit 192

                                fi

                         

                        #READ THE FILE ROW BY ROW

                        while read UPDATE

                        do

                         

                             echo "TRYING TO INSTALL UPDATE: $UPDATE"

                             QUERY_UPDATE     

                         

                         

                        done

                         

                         

                        #RUN CLEANUP

                        CLEANUP

                         

                        #CHECK REBOOT

                        CHECK_REBOOT

                         

                         

                        exit 0

                         

                        #END

                        /code

                        • 100. Re: More ESX 3.0.1 03/05/07 Patches......
                          jlalvarado Novice

                          Michael,

                           

                          Thank you very much for your post, the script helped tremedously.

                           

                          Kudos to your efforts!

                          • 101. Re: More ESX 3.0.1 03/05/07 Patches......
                            EclipseAgent Enthusiast

                            Michael,

                             

                            Thank you very much for your post, the script helped

                            tremedously.

                             

                            Kudos to your efforts!

                             

                            Michael,

                             

                            Thank you very much for your post, the script helped

                            tremedously.

                             

                            Kudos to your efforts!

                             

                            IMO.. It's way too much..

                             

                            What I will typically do is:

                             

                            #Untars all packages

                            for i in *; do cd $i; for j in *.tgz; do tar -xvzf $j; done; rm -rf *.tgz; cd ..; done /code

                             

                            Be aware that for "Bundles",  you'll either have to add an if statement that looks for a directory ESX*, change directory to it, then mv all directories within that to the directory below, but I just did this manually.

                             

                            #Installs all packages

                            for i in \*; do cd $i; for j in ESX*; do cd $j; esxupdate --noreboot update; cd ..; done; cd ..; done /code

                             

                            Here is how I do it..

                             

                            I have a folder on the fileserver named 3.0.1 within that I have the date of the updates released (ie. 11-30-06, 03-05-07 etc).

                             

                            The above script does it chroniclogilly(sp?) from the oldest to newest, and within each months folder.

                             

                            Not sure if I am explaining myself good..

                             

                            Message was edited by:

                                    EclipseAgent

                            • 102. Re: More ESX 3.0.1 03/05/07 Patches......
                              guser Enthusiast

                              Hello,

                               

                              I've run into an error when applying the patches using MichaelJKnights script.

                               

                              22/06/07 11:07:50 Patch ESX-3199476 17 of 41 Installation Started

                              INFO: No repository URL specified, going with file:/var/updates/ESX-3199476

                              INFO: Configuring...

                              INFO: Preparing to install VMware ESX Server ESX-3199476...

                              ERROR: Error (123) executing \[ls /boot/grub/grub.conf /boot/grub/device.map /boot/initrdvmnix.img | xargs tar -P -czf /var/spool/esxupdate/systemfilesbackup.tar.gz /etc/vmware/*]

                              tar: /etc/vmware/esx.conf.READLOCK: Cannot stat: No such file or directory

                              tar: Error exit delayed from previous errors

                               

                              22/06/07 11:07:57 Patch ESX-3199476 Installation Completed

                              /code

                               

                              In this thread, http://www.vmware.com/community/thread.jspa?messageID=624674&#624674 Svantes says: "It seems what happened was that the script was running too fast, and started the next patch when lockfiles were still in place?"[/i]

                               

                              If this is true, maybe a delay should be added in the script after each call to esxupdate.  Can you confirm that this would be the correct addition to the script?

                               

                              \# Update patch bundle script with patches now in release date equence....

                              pcount=1

                              echo

                               

                              for i in `ls -ltr 2>/dev/null | awk '\{ print $9} '`

                              do

                                  echo Sequencing $i into patch bundle script

                                  echo cd $localinstall/`echo $i |cut -f1 -d. `>> $localinstall/patchbundle.sh

                                  echo echo ' `date +%e/%m/%y" "%H:%M:%S` ' "Patch `echo $i |cut -f1 -d. ` ` echo $pcount of $esxpatches ` Installation Started " >> $localinstall/patc$

                                  echo "/usr/sbin/esxupdate -v 20 -n update" >> $localinstall/patchbundle.sh

                                  echo echo ' `date +%e/%m/%y" "%H:%M:%S` ' "Patch `echo $i |cut -f1 -d. ` Installation Completed " >> $localinstall/patchbundle.sh

                                   

                                   

                              1. *** ADDED - delay between calls to esxupdate ***

                                  echo "sleep 5" >> $localinstall/patchbundle.sh

                                       

                                  let "pcount = $pcount + 1"

                              done

                              /code

                               

                              thank you,

                              /guser

                              • 103. Re: More ESX 3.0.1 03/05/07 Patches......
                                Edt Lurker

                                Hi Michael,

                                I tried your code, but have not been successful. I got errors:

                                "bad interpreter: No such file of directory"

                                I ran the following:

                                sh ./file.sh --->shows an error on line 26

                                line 26: syntax error near unexpected token 'fi'

                                line 26: 'fi

                                 

                                 

                                Also, I did the following:

                                which sh  --> and got the following /bin/sh  {which seems OK}

                                 

                                hope you can help

                                 

                                Ed

                                • 104. Re: More ESX 3.0.1 03/05/07 Patches......
                                  jlmale0 Novice

                                   

                                  I'm having difficulties when I cut&paste the script.  In particular line 81 setting the tstamp variable seems to have a mismatched back tick(`).

                                   

                                   

                                   

                                   

                                   

                                  Digging into the logic, it seems something got missed entirely.  The whole point of the line is to pull out the patch date so as to update the timestamp of the file/directory.  I would expect to see the timestamp update accomplished with /bin/touch, but I never see this called.

                                   

                                   

                                   

                                   

                                   

                                  Am I missing some wonderful magic, and the task is being accomplished, or did the code get corrupted somewhere along the way?

                                   

                                   

                                   

                                   

                                   

                                  ps Any luck on getting a more permenant home for this script?  Downloading directly may have circumvented this issue entirely.

                                   

                                   

                                  1 3 4 5 6 7 Previous Next