Optimizing Windows XP for VDI

Submitted by jbredehoeft on Sat, 12/03/2011 - 23:00

It is important to optimize the desktop for your VDI environment, this is true if your environment is Citrix XenDesktop or VMWare View. This document will outline some of the key changes that need to be made with your desktop. If this is to be your template give it a meaning full generic name such as "xp-template"
Recommended Configurations:

  • 1 vCPU - for most users this is sufficient.
  • 512 MB Memory
  • 1 VMnic - this should be the VMXNET 3 to take advantage of the best Network speeds.
  • LSI Logic Adapter -- this is not included as part of Windows XP, so you will have to install this during OS installation.
  • Disk should be large enough for OS, Patches and locally installed applications. Best Practice is to store user information, profile and documents on a network share.
  • Disk Align this on 64K or 128K borders. See the article on "Disk Alignment."
  • Enable 24-bit color for RDP, by default this is only 16. This can be changed with a Group Policy, or by the following regkey:
    • HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp, change the color depth to 4.
  • Disable unused HW. For instance COM ports, flp.
  • Set the CD to client
  • Turn off theme enhancements.
  • Adjust "MY Computer -> Properties -> Advanced Tab -> Performance -> Settings for best performance.
  • Ensure hardware acceleration is enabled.
  • Delete hidden update uninstall folders from c:\windows.
  • Disable Indexing Services
  • Remove System restore points.

You will also need to create a number of GPOs to further enhance the system. This should be under Terminal Services and Terminal Services Sessions.

  • Enforce Removal of Desktop Wallpaper.
  • Allow user to connect remotely using Terminal Services.
  • Disable Remote Windows Security Item from Start Menu. This ensures a log off mechanism.
  • Enable Remove Disconnect option from Shut down dialog. This minimizes the possiblity of users diconnecting rather than logging off.

Sessions GPOs.

  • Set time limit for disconnected sessions to enable. This logs off any stale disconnected sessions.
  • Set a time limit for active but idle sessions to enabled. You will likely have to install the Hotfix KB890864 to enable the idle tracker for XP.

The following additional configuration changes are recommended, these are registry key changes.

  • Disable Last Access Timestamp -- [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
    • "NtfsDisableLastAccessUpdate"=dword:00000001
  • Disable TCP/IP Offload -- [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
    • "DisableTaskOffload"=dword:00000001
  • Disable Windows Tour -- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Tour]
    • "RunCount"=dword:00000000
  • Disable Offline Files -- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\NetCache]
    • "Enabled"=dword:00000000
  • Disable Background Defragmentation -- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction]
    • "Enable"="N"
  • Disable Memory Dumps -- [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl]
    • "CrashDumpEnabled"=dword:00000000
    • "LogEvent"=dword:00000000
    • "SendAlert"=dword:00000000
  • Force Offscreen Composition for Internet Explorer -- [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
    • "Force Offscreen Composition"=dword:00000001
  • Reduce Menu Show Delay -- [HKEY_CURRENT_USER\Control Panel\Desktop]
    • "MenuShowDelay"="150"
  • Set Screensaver to Blank -- [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Control Panel\Desktop]
    • "SCRNSAVE.EXE"="scrnsave.scr"
  • Remove Unneeded Programs from the Run Key. After installing all third party applications into the image, it is important to analyze the user and machine “Startup” paths and “Run” keys (typically, HKLM\Software\Microsoft\Windows\Current Version\Run). Many common applications, such as Adobe Reader and Java, add helper applications to these locations so that the software can check for updates and load more quickly. However, these helper applications are typically undesirable in a hosted VM-based VDI desktop deployment as they consume resources and can prompt users unnecessarily.
  • Optimize Antivirus Scanning. It is important to review the antivirus software configuration. It is also recommended to exclude the paging file and print spool folder.
  • Ensure KB941158 is Applied. Although KB941158 is supposed to be included in Windows XP Service Pack 3, the iedkcs32.dll file is not updated properly in some environments. Verify the version of this file in the %WINDIR%\system32 folder and ensure it is at least 17.0.6000.20668. If not, the updated version of the file can be found in a nested windows directory by using Windows search. Copy the updated version to the %WINDIR%\system32 and %WINDIR%\system32\dllcache folders. Once the iedkcs32.dll file is updated, the fix must then be enabled by adding the registry key documented in Microsoft Knowledge Base article KB941158.

While both View and XenDesktop are designed to work with Windows XP, these changes optimize the system to utilize the resources in the best possible manner. By applying this methodology to the XP image the user can have the best possible experience while reducing the impact on the VDI infrastructure.