VMware ESXi 5 – Applying Patches and Updates

(ESXi 5 Update 1 and Patches)

KB ID 0000623

Problem

When VMware released ESX 4.1, they took away the “Host update utility”, (which was a mistake!). For people without VMware Update Manager, you now have to either put in the CD/DVD and do an ‘in place upgrade’, or grow a ginger pony tail and put some socks/sandals on and do some Linux.

Below I’ve got a build of ESX with no updates on it, I’m going to apply the ‘Update 1″ then the most recent patch to bring the host up to date (at time of writing).

Solution

1. Whilst connected to your host with the VI client > Select the host > Configuration > Security Profile > Services Section > Properties > SSH > Options >Start > OK > OK > Exit the VI client.

2. Connect to the host via an SSH command window (PuTTy shown). Log on as the root user, to check your current ‘build’ version issue the following command;

[box]vmware -v[/box]

3. You should have a fair idea what piece of storage has the most free space already, this host only has one datastore (datastore1). That’s the one I’m going to download the updates into. To view the Datastores issue the following command;

[box]ls -l /vmfs/volumes/[/box]

4. Change directory, so that you are ‘in’ that datastore and create a directory called ‘UPDATE’.

[box]cd /vmfs/volumes/datastore1<br /> mkdir UPDATE[/box]

5. Then change into that directory;

[box]cd UPDATE[/box]

6. From a browser visit the VMware patch portal, locate the update you want to download and install, (here it’s VMware 5.0.0 Update1). Right click the download link and copy the URL.

Note: Patches after major updates are cumulative, I also downloaded the ‘latest’ patch.

7. You need to remove the ‘s’ from the URL, I just paste the link into notepad, edit it then copy it again.

8. Back at your command window download the update with the following command;

[box]wget http://hostupdate.vmware.com/software/VUM/OFFLINE/release-328-20120312-212851/update-from-esxi5.0-5.0_update01.zip[/box]

9. When completed, download any other required patches;

[box]wget http://hostupdate.vmware.com/software/VUM/OFFLINE/release-341-20120605-165537/ESXi500-201206001.zip[/box]

10. Before applying the update/patches, the host needs to be in maintenance mode;

[box]vim-cmd hostsvc/maintenance_mode_enter[/box]

11. Then apply the update with the ‘esxcli’ command as follows;

[box]esxcli software vib install -d /vmfs/volumes/datastore1/UPDATE/update-from-esxi5.0-5.0_update01.zip[/box]

12. When complete, you will need to ‘scroll up’ and make sure it says, “Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.”

13. After the update, I am applying the latest patch with the same esxcli syntax, like so;

[box]esxcli software vib install -d /vmfs/volumes/datastore1/UPDATE/ESXi500-201206001.zip[/box]

14. Once again you will need to ‘scroll up’ and locate, “Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.”

15. Now reboot the host;

[box]reboot[/box]

16. Once the host is back online, connect and take it out of maintenance mode.

17. Then locate the folder containing the update software and patches.

18. And delete it.

19. Finally power your guest machines back on again.

Related Articles, References, Credits, or External Links

Enable SSH Access to vSphere ESXi

Upgrade vSphere 4 Environment to vSphere 5

Update VMware ESXi from 4.0 to 4.1

Upgrade ESX 3 to version 4.1.0

Windows 7 – Cannot Install Service Pack 1Windows Server 2008 R2 – Cannot Install Service Pack 1

KB ID 0000408 

Problem

It’s the same service pack for both products (in case you were wondering about the title).

Service Pack 1 has been out for a just over a week now, so we have had enough time to see any glitches and problems.

Solution

Errors:

If your update fails with error 8007f0f4 or FFFFFFFF this has been attributed to malware click here.

If your update fails with error 0x800f0a12

Press Start > Run > cmd {enter} > Run > the following two commands.

[box]diskpart auto mount enable[/box]

Then reboot (If the problem persists click here.)

If those are not applicable..

1. Make sure Windows Update is actually working on your PC, it may have not been updating for a while click here.

2. Make sure you are Virus/Malware free – if (as illustrated) you are running Microsoft Security Essentials ensure you are running the latest version, earlier versions have caused problems with SP1.

3. Make sure you do not have the pre-release version of Service Pack 1 installed. Click Start > right click Computer > properties, (or run winver.)

Look for “Service Pack 1” If it says version 531 or version 720 you will need to uninstall this first, If it says version 721 then Service Pack 1 is already installed. (source).

To uninstall the pre release version, click Start > appwiz.cpl {enter}

Click “View installed updates”

Locate Service Pack for Microsoft Windows (KB976932) and uninstall it.

Note: If the update is “grayed out” then the uninstall information for that update is not on the computer. If Service Pack 1 was installed when you got the computer you have no option but to wipe and reinstall Windows7. If you you performed a disk cleanup and ticked remove service pack backup files….

You will also need to wipe and reinstall Windows – sorry 🙁

4. You may also cure your install problems by running the system file checker. Click Start > type in cmd > Right click the cmd program and select “Run as Administrator” > when the command window opens run the following command.

[box]sfc /scannow[/box]

5. Run the System Update Readiness Tool, all being well it should look like nothing has happened when it’s been installed, it creates a log file (called CheckSUR) at the following location:

[box]C:WindowsLogsCBS[/box]

6. Finally retry installing Service Pack 1 > Start > Windows Update > Locate SP1 > tick for installation > OK.

Other Known Problems

Windows 7

You may need to install these two updates before you can see the Service Pack 1 update.

http://support.microsoft.com/kb/2454826 http://support.microsoft.com/kb/976902

Windows Server 2008 R2

If you have any of the following hotfixes installed, you need to update them.

http://support.microsoft.com/kb/983534 http://support.microsoft.com/kb/979350 http://support.microsoft.com/kb/2406705  

Related Articles, References, Credits, or External Links

NA