Updating offline ESX(i) host
by VMax on Jan.13, 2010, under Technical
If you ever tried to update an ESX(i) host which also is your internet gateway, you know the VMware vSphere Host Update Utility will fail. This is because the Utility downloads the patches after putting the host into maintenance mode. Your routing software will be down and internet not accessible.
Lucky for you there is a way to patch your host while it’s offline. To do this you must have the vSphere Client installed.
- The easiest way to check for patches is by scanning for patches with the Host Update Utility. Click the patch host button and read the description of the patches, write down the KB article number that is mentioned. Example:
See http://kb.vmware.com/kb/1016295 for more details
- Go to https://www.vmware.com/mysupport/download/. Search by the corresponding product, ESX or ESXi. You will get a list of patches, newest on top. The left pane contains a link to download the file right under the name of the patch. Go ahead and download the patches that have a link to one of the KB numbers you noted earlier.
- Go ahead and log into the vSphere Client and put the host into maintenance mode. This is needed for most of the patches.
- Move your download files over to the bin directory of your vSphere Client installation, this step simplifies the CLI instructions. Example location: C:\Program Files (x86)\VMware\VMware vSphere CLI\bin
- Fire up a Command Prompt or Terminal and navigate to the same folder. We will use the vihostupdate.pl script to update the host. Go ahead and type:
vihostupdate.pl –server 192.168.1.254 -i -b ESXi400-200912001.zip
–server contains the server address of your ESX(i) host.
-i tells the script to install the patch.
-b tells the script to extract the .zip file.
ESXi400-200912001.zip is the downloaded patch file.You should run this command for every downloaded .zip file.
- Reboot the host if needed (this information can be found on the download page under System Impact).
Your host should now be updated, check the build number or run the Host Update Utility to verify there are no more patches to apply.