We recently upgraded a vSphere 5.0 environment to 5.0 U3 and used the maintenance window of the vCenter server to also install missing Windows updates on this and the vCenter database SQL server (both running Windows 2008 R2).
A generously dimensioned downtime of four hours was communicated before the upgrade -, and we managed to finish all the work just in time. Why? Because it took two hours alone to install the Windows updates! 18 patches were missing, and they took ages to install, particularly the .NET Framework 4 patches. I tried all sorts of things to speed this up during the installation (stopping unnecessary services and the Virus scanner), but to no avail. Eventually the updates finished successfully, and later I took myself some time to find out why it took so long and what you can do about this. Here is what I found out ...
"Updates to the .NET Framework 4 require a complete regeneration of the Native Image Cache, a very time-consuming operation." This is a quote from Microsoft's KB2570538 article that I soon stumbled over when researching. There are also instructions on how to optimize this process so that it takes less time.
Before the patch installation you need to run the command
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe update /force /queue
and - for 64bit Windows - in addition:
%windir%\microsoft.net\framework64\v4.0.30319\ngen.exe update /force /queue
I tried this on a test server, and I had the feeling that the update installation went significantly quicker there. This might be coincidence, more tests and comparisons are needed, but this is definitely something to keep in mind (This blog post is mainly a reminder for myself to try this out on this particular vCenter and SQL server during the next maintenance window, but I'm not sure if and when this will take place).
By the way, during testing I also found a test server where I was not able to install any .NET Framework patches at all. Their installation was always failing, and I suspected that my ngen.exe optimization tweak was causing this. However, it turned out that the .NET Framework installation was somehow corrupted on this server. Luckily Microsoft has a .NET Framework Repair Tool for such cases, and it helped me to fix this corruption.
This post first appeared on the VMware Front Experience Blog and was written by Andreas Peetz. Follow him on Twitter to keep up to date with what he posts.