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"|
|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.
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:
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!