Windows 7

Prepare Windows 7 Gold Master Virtual Machine for Cloning

I shared this link as part of my VMware Horizon View – Resource Dump post, but there is a section of it that I thought deserved special attention.

The full origional post is here if you wish to review it: VMware View 5.x – Windows 7 Golden Image

Specifically, the final step in the post contains very good information on how to “Clean up the machine”. I’ve adopted this process in my own environments to prepare Windows 7 gold master virtual machines for cloning, and I highly recommend it.

Important notes: These steps assume you’ve fully patched, installed all third-party software, made all necessary changes, and are fully prepared to finalize your gold master VM for deployment. These steps should be repeated every time changes are made to the gold master VM before creating a new snapshot and recomposing your desktop pools.

On your gold master virtual machine, perform the following to finalize it for deployment:

  1. Open an elevated command prompt
  2. Enter and run:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\ngen.exe executeQueuedItems

*Depending upon your OS version and .NET Framework versions installed, the exact folder containing ngen.exe may be different. I recommend that you verify this path prior to running these commands.

According to the referenced post, “This (command) will precompile all .NET assemblies which might still be queued”. If this is the first time this command has been run on this system you may see it run through a series of tasks that can take several minutes to complete, but it’s also normal to receive a simple “All compilation targets are up to date” message.

  1. If the OS is 64-bit, run the same command again but from the Framework64 folder.

C:\Windows\Microsoft.NET\Framework64\v2.0.50727\ngen.exe executeQueuedItems

  1. Browse to and delete all contents of C:\Windows\SoftwareDistribution\Download
  2. Run the following to clear all of the system event logs:
    • wevtutil el >a.txt
    • for /f %x in (a.txt) do wevtutil cl %x
    • del a.txt
  1. Run Disk Cleanup on drive C: to remove unneeded files
  2. Defragment drive C:

*If you’ve followed VMware’s recommended optimizations for Windows 7, the Disk Defragmenter service is likely disabled. You will need to enable and start this service in order to defragment the disk, but be sure to disable it again before continuing.

  1. Release the IP address with ipconfig /release
  2. Flush the DNS cache with ipconfig /flushdns
  3. Shut down the VM and take a snapshot to use for cloning

-Rick

Advertisements

VMware Horizon View – Resource Dump

When preparing for my VMware Horizon View deployment, I spent a lot of time (as you should too) searching, reading, and parsing through official documentation and expert guides. Most of what I found is easy enough to find with some simple Google searches but, in the interest of consolidation and to save you the trouble, what follows is a resource dump of what I found the most helpful.

VMware Horizon View Infrastructure Planning, Installation, and Administration

VMware Horizon View 5.3 Official Documentation Page

VMware Horizon View Architecture Planning

VMware Horizon View Installation

VMware Horizon View Administration

VMware Horizon View Security

VMware Horizon View Upgrades

Operating System Optimization for VDI

VMware Horizon View Optimization Guide for Windows 7 and Windows 8

VMware View 5 PCoIP Optimization Guide

VMware Horizon View 5.2 Performance and Best Practices

VMware OS Optimization Tool

My Top 10 VMware View Performance Tips

Turbo-charge View Video Performance

“For desktop VMs using VMXnet3 NICs, you can significantly improve the peak video playback performance of your View desktop by simply setting the following registry setting to the value recommended by Microsoft:”
HKLM\System\CurrentControlSet\Services\Afd\Parameters\FastSendDatagramThreshold to 1500

View Accelerated – 3D Graphics with Horizon View 5.2

“Registry change on the VM – [HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware SVGA DevTap]
“MaxAppFrameRate”=dword:00000000 – If it does not exist it defaults to 30. Set it to 0 to disable any frame cap.”

How to improve VMware View video performance

VMware KB 2010359

Method 1:
1. Power off the virtual machine using the vSphere Client.
2. Right-click the virtual machine and click Edit Settings.
3. Select the Options tab and under Advanced.
4. Click General.
5. Click Configuration Parameters and click Add Row
6. In the Name field enter mks.poll.headlessRates and in the Value field enter 1000 100 2.
7. Click OK.
8. Power on the virtual machine.

VMware View 5.x – Windows 7 Golden Image

“Video Card: Do not “Auto detect” (see VMware KB 1017380), set to 2 displays and 128 MB video memory”

“Remove he following components (features) from the OS (unless you really need them) and reboot VM:
• Games
• Media Features – Windows DVD Maker
• Media Features – Windows Media Center
• Print and Document Services – Internet Printing Client
• Print and Document Services – Windows Fax and Scan
• Tablet PC components
• Windows Gadget Platform”

Suggested changes to VMware View Optimization Script for Windows 7

-Rick

Microsoft Public KMS Client Setup Keys

I always forget to bookmark this link and end up spending a few minutes Googling around for it whenever I need it, so just in case I’m not the only one…

Here is the link to Microsoft’s public KMS client setup keys. Useful for when you have an internal KMS server set up, but need to install the OS from the original installation media. Saves you from needing to scramble around for the activation key that shipped with the media when you’re prompted during setup.

http://technet.microsoft.com/en-us/library/jj612867.aspx

Recreate the Local Group Policy Cache in Windows

Happy Monday!

This is something I ran into a while back and has come in handy on several occasions.

For those who may be unaware (as I was before stumbling upon this trick), Windows maintains a local cache of all the group policy settings that are applied to that particular system. This cache can occasionally become corrupt or de-synchronized with the domain controller, which can cause a variety of issues including failure to apply new group policy settings or changes to existing policies.  When this occurs, the quickest and easiest way that I’ve found to correct it is to clear and recreate this local cache.

To clear the local GPO cache, make sure you can view hidden files and folders and perform the following:

  1. Browse to C:\ProgramData\Microsoft\Group Policy\History (Windows 7 / Server 2008)
  2. Delete all of the contents under the History folder
  3. Open the command prompt and run GPUpdate /force
  4. Reboot the system

I initially came across this while troubleshooting a Windows 7 client that was flat out refusing to apply new Group Policy settings. After ruling out the new GPO itself by checking it for content errors, verifying that it was linked up to the proper OU in Active Directory,  the link order was correct, and security filtering properly configured, I turned to the client for additional troubleshooting. A GPResult confirmed that the new GPO wasn’t being read and, other than some generic group policy errors, the Event Logs proved inconclusive. So I eventually turned to the web and come across this article on the Windows Server TechNet forums where someone mentioned attempting to clear the local GPO cache, which worked like a charm.