Windows 7 optimisation for VDI

Here are some tips for tuning Windows 7 for a VDI environment

VDIOptimizer by Jonathan Bennett collects together some tweaks.
https://www.autoitscript.com/site/autoit-tools/vdi-optimizer/

Choose your preferred config and it will generate a vbScript for you to add to your deployment process.
* Disable Superfetch Service
* Enable Windows Search Service – Required to search in Start Menu.  You could disable indexing on specific folders/drives with attrib.exe +I
* Disable NTFS Last Access Timestamps (usually off by default on Windows 7)
* Disable background disk defrag (local scheduled task)
* Disable background diagnotics (local scheduled task)
* Disable hibernate
* Disable System Restore (creation of restore points before each software install)
* Disable machine account password changes (reverting VMs to previous snapshots can fail if machine account password has changed)
* Disable Address layout randomisation. I though this might help with VMware memory page interleaving, but breaks Adobe Reader XI 11.0.03.
* Disk cleanup (do this before capturing your reference VM for cloning
* Minimise event log sizes
Set a pagefile size and prevent it from growing dynamically


Const MAX64bitPAGEFILE=4096
Const MAX32bitPAGEFILE=2048

Set oShell = WScript.CreateObject ("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")

' Pagefile does not grow dynamically
RunWait "wmic computersystem set AutomaticManagedPagefile=False"
If oFSO.FolderExists("C:\windows\syswow64") Then
' 32bit VM
RunWait Replace("wmic pagefileset where name=""c:\\pagefile.sys"" set InitialSize=#SIZE#,MaximumSize=#SIZE#","#SIZE#",MAX64bitPAGEFILE)
Else
' 64bit VM
RunWait Replace("wmic pagefileset where name=""c:\\pagefile.sys"" set InitialSize=#SIZE#,MaximumSize=#SIZE#","#SIZE#",MAX32bitPAGEFILE)
End if

Function RunWait(sFile)
WScript.Echo "running: " & sFile
RunWait = oShell.Run(sFile, 1, True)
End Function

Some of the Windows 7 display features feel clunky in a VDI session. Tuning these down makes the desktop feel more snappy.
Performance options, Visual Effects
Let Windows choose what’s best for my computer

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\AnimateMinMax]
"DefaultValue"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ComboBoxAnimation]
"DefaultValue"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ControlAnimations]
"DefaultValue"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\CursorShadow]
"DefaultValue"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DragFullWindows]
"DefaultValue"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\DropShadow]
"DefaultValue"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\FontSmoothing]
"DefaultValue"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\MenuAnimation]
"DefaultValue"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\SelectionFade]
"DefaultValue"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\TaskbarAnimations]
"DefaultValue"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\ListBoxSmoothScrolling]
"DefaultValue"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\TooltipAnimation]
"DefaultValue"=dword:00000000


Find more IT Infrastructure tips at www.alexmags.com

Leave a Reply