HOWTO: Patch VMware vSphere ESXi 5.0 Free Edition

Here's how to patch a free version of vSphere ESXi 5.0.  They don't make it easy to figure this out, I guess they want you to spend the money for licenses, but the product is free and sometimes it needs to be patched.  If you launch the vSphere client, and look around the menu options, you can't find anything about patching (unless you have a licensed version, with vCenter and Update Manager installed).

When I looked around on the Internet to find out how to patch free ESXi, I found instructions to download the vSphere Management Assistant (vMA), which is a virtual appliance with the vCLI installed.  Sounds great, but it turns out that all your VMs need to be shut off, and the host put in maintenance mode for patches to be installed, so unless you have the vMA running on another host, then vMA is gonna be off when you need it.  So much for that idea.  Besides you don't need vMA.  We can do the upgrade right on the command line at the host.

-->

Getting the Patches
OK, the first step is to download all of the patches for ESXi..  Go to http://www.vmware.com/patchmgr/download.portal, select ESXi (Embedded and Installable), 5.0.0, and click search.  Download each of the patch bundles listed, do NOT unzip the files.  Save the patches in a folder, maybe called esxi-patches.

Now launch the vSphere client, connect to the host, click on the host and click the summary tab.  Right click on a datastore and select "Browse Datastore".

Select a datastore - right-click and select "Browse DataStore"
In the datastore browser, click the create folder button and create a folder to put your patches in (if you upload the patches into the root of a datastore, you'll get an error when you try to apply the patches), then select the folder and click the upload button as shown below, and upload your esxi-patches to the folder.

Upload the folder to the datastore

Enable ESXi Console and SSH
Next, we have to enable console access.  In the vSphere Client, with the host selected, click the Configuration tab, then click "Security Profile" in the software section of the configuration screen.  Now click the Properties link to the right of the Services list.  The services list is shown below.

Service Properties
Now select "ESXi Shell, click Options, and click Start.  Repeat for SSH.  When both are started we can close the service properties window.

Preparing the Host
OK Now we can get the host ready to patch.  Shut down all of your VMs.  If you have VMware Tools installed, you can select a VM, and hit CTRL-D to initiate a shutdown.  After all of your VMs are shut down, right-click the host and select "Enter Maintenance Mode".


Logging into the Host via SSH
Now we can SSH into the host.  If you don't already have an ssh client, you can download Putty here from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.

Launch Putty (or your favorite ssh client) and enter the name or IP address of your host and click Open (or connect).  Accept any warnings about the key mismatch, and when prompted, enter the root username and password.

Applying the Patches
Finally, we can apply the patches.  Now notice the patch zip files are named by date.  We will install the zip files one at a time, from oldest to newest.  For each zip file, type the following command:

esxcli software vib update --depot /vmfs/volumes/<dataStoreName>/<folderName>/zipfile.zip

The patch will take a few seconds to run, with no indication of progress, so be patient.  Repeat the command for each patch, from oldest to newest until complete.  After the patches have been installed, type reboot and press enter.  The host will be rebooted.

After the host has rebooted, reconnect to it with the vSphere client.  Right-click the host and select "Exit Maintenance Mode", then restart your VMs.

Upgrade VMware Tools
If the patches included a new version of VMware tools, you will notice that, in the summary page of the VMs, it will report that a VMware tools upgrade is available.  Right-click the VM, select, Guest - Install/Upgrade VMware Tools.  You will be prompted to perform a manual or automatic upgrade.  Windows 2008R2 seems to perform the automatic upgrade, Windows 2003 does not.  If an automatic upgrade doesn't seem to be working, end it by selecting Guest - End VMware Tools Upgrade, then do a manual install.  Manual upgrades typicall require a reboot of the guest.  Reboot when prompted.

Once all of your VMs report up-to-date VMware Tools, the patching process is complete!

Related Posts:

46 comments:

Anonymous said...

good post. thanks!

Anonymous said...

thanks for this, great info!

Anonymous said...

Brilliant post. Thank you so much for this.

Geoff said...

Thanks a million, Brian.

Anonymous said...

Thanks!!!!

zSprawl said...

Worked perfectly. Thank you.

Bruce (PMToolsThatWork.com) said...

Worked perfectly. Thank you.

Anonymous said...

Very clear and to the point topic,,many thanks,,I do however like to point out that I was able to do the update using vCli shell without enabling the ESXi console and SSH.

Anonymous said...

Worked or me too. Saved my Sunday!
Cheers mate!
Christian

Anonymous said...

Worked for me.

Thank you.

SREEVATSA said...

PERFECT ....

THANKS

Ralph said...

Worked like a charm. Perfect.
Thanks!

TonyK said...

Hello.

When patching ESXi 4.1 host currently at Patch 348481, do I need to install ALL patches between 348481 and 702113, do I need to install all patches in between or does the 702113 patch contain all patches below it?

Cheers,
ak.

Brian said...

In both 4.1 and 5.0, there are three types of updates: the base image, VMware Tools, and third-party drivers. The latest versions of all three are not included in every update. You may choose to investigate which drivers you are actually using, and select updates as needed, but I find that is a pain and not worth the trouble. Instead, I simply apply all updates in order of release, just to be sure that everything is up to date. Call me lazy.

Rick Eveleigh said...

Thanks, didn't have enough info on any other blog entry. For a (very experienced but only) Windows user doing this stuff is challenging. Much appreciated.

Anonymous said...

Great information, thank you!

Note that there can be no spaces in the path or esxcli will fail.

Thanks again!

Anonymous said...

Nice description. This really helped. Straight to the point. Thanx.

Unknown said...

Thanks a bunch, worked great for me!!

Anonymous said...

thank you for this awesome guide

zaq said...

Thank you very much for this guide. Needed it to try windows server 2012. I got an 'hal_initialization_failed' related error right after boot.

Installing this patched solved that problem.

Geek.IT.ude said...

Your guide was instrumental in ending a multi-hour marathon of expletives set off by the failure of ESXi Hypervisor 5 Free to autostart my guest machines. I love this product, but continue to hate the useless VMWare labrynth they call a website.

Thanks so much for posting this!

Brian said...

This article has received over 16000 hits so far. I'm really glad to see that it's helping people out!

garyj said...

Excellent post thank you so much for your help!

Anonymous said...

Thanks for the post!

Anonymous said...

Thank You for your Post! Very Helpful
Can Anyone tell me though,- Do I have to install all of the patches they have listed or will the latest one have all fixes combined in the .zip file?

Dirk [GdP Software] said...
This comment has been removed by the author.
Dirk [GdP Software] said...

Forget my comment - it run fine now. The zip-file needs to be stored in a subfolder of the datastore. If it is at top level, the update will fail.

Brian said...

I think that some of the patches include drivers and other provide the updated boot image, so just applying the latest patch doesn't update everything. I think it's safe to start with the latest full update then apply all the minor patches after that. They sure don't clarify this point do they!

Rik said...

thx so much!!

Anonymous said...

Great! Thanks a lot!

Anonymous said...

Thanks a lot!!!

Anonymous said...

You are the men!
Thanks

Anonymous said...

A very informative proceedure and easy to follow, worked like a charm, thank you very much Brian !

Just a quick note to anyone with more than 32GB RAM installed, once you patch Update 1 and re-instate your original free licence, it won't take it basicly stating you have too much RAM for the free version. This was a bug in the original release of V5.0 which didn't recognise this that Update 1 has now apparently fixed !
The only solution except to buy a licence is to remove all excess RAM leaving a max of 32GB.

First time I've not been that impressed with VMware !

Anonymous said...

Thanks for your valuable help!

Anonymous said...

Nice, big help. Simplifying a what "should be" a simple update!!!

David said...

Brian
Thank you so much. A very clear step by step instruction, that even a novice like me can follow. Excellent. Hope you have similar articles for other tasks with VM Ware.
Great job, keep it up.
Woo Hoooooo

Anonymous said...

Awesome Post. Thanks for the help.

Anonymous said...

You saved my day. Thanks a lot. :)

Anonymous said...

very good !!

thanks

Anonymous said...

Thanks for the post, I'm saving this info for the next time around. 1 question though, once the patches have been applied, is there any need to keep them in the datastore?

Brian Seltzer said...

No, after you've applied the patches, you can delete them. When new patches come out, just download the latest ones and apply them. If you've missed any patch releases, just get the latest patches that include esx-base, vmware-tools and drivers and that should get everything up to date.

Anonymous said...

Thank you sooooo much for this easy guide to follow. It was a piece of cake!

Anonymous said...

Excellent post, it worked for ESXi 5.1 also!

Anonymous said...

Thank you!

Anonymous said...

Hi Brian

Worked like a charm for me on my ESXI 5.1, after all else failed.

Thanks a lot man.

Anonymous said...

Thank you, sir!

Post a Comment

Related Posts Plugin for WordPress, Blogger...