Custom VMware Tools Install for Windows 7 Citrix XenDesktop VDI

Note: This post was updated on 19 August 2011 - see http://cosonok.blogspot.com/2011/08/update-custom-vmware-tools-install-for.html


Scenario:

An end user is reporting poor performance from their Windows 7 VDI. Analysis with Task Manager and then Process Explorer reveals that vmtoolsd.exe is consuming nearly 100% of 1 CPU for a few seconds every 10 seconds or so. Investigation reveals that a typical VMware Tools installation was applied to the Windows 7 VDI.

Resolution:

Reinstall VMware tools applying a custom setup as below:

YES – Toolbox

VMware Device Drivers
NO – Memory Control Driver
NO – Thin Print
NO – Paravirtual SCSI
NO – Mouse Driver
NO – Shared Folders
YES – SCSI Driver
NO – SVGA Driver
NO – Audio Driver
YES – VMXNet3 NIC Driver
NO – VMCI Driver
NO – Volume Shadow Copy Service
NO – Wyse Multimedia Support

Guest SDK
NO – WMI Performance Logging

This is a personal best practice VMware tools install for a Windows 7 Citrix XenDesktop (the virtual desktop I am writing this document on has its VMware tools installed thus way,) and reduces the number of components installed down from 13 in the typical install (which just excludes Wyse Multimedia Support) to 3. Performance is now excellent and vmtoolsd.exe is behaving!

To explain the above selections, it needs to be remembered that the Citrix Virtual Desktop Agent applies its own drivers, so no functionality is lost in not installing most of the VMware Device Drivers. Most of the drivers installed in a VMware tools install, only really apply when you are accessing the guest machine using the vSphere client or similar. The VMXNet3 NIC driver is necessary if using the VMXNet 3 NIC – which is recommended.

Rounding off this post below are a few compliled notes/tips and an appendix - VMware Tools Component Feature Descriptions

Notes

Note 1: This was specifically done with Windows 7, Citrix XenDesktop 5, VMware ESXi 4.1 – applicable to other flavours too.

Note 2: This came from investigating the problem with vmtoolsd running with high CPU utilization. Some suggesting fixes including manually rebuilding performance counter library values did not help. An error for Process Explorer regarding .NET performance counters are corrupt – mentioned running EXCTRLST from the Microsoft Windows Resource Kit to repair (alas could not find a Windows 7 version of this, only the Windows XP edition from the Windows XP Service Pack 2 Support Tools – which was not compatible.)

Note 3: Technically - if you use the E1000 network adapter with your Windows 7 VDI, it will run fine without any VMware tools installed at all (transparent page sharing, and memory compression continue to operate.) The ability to do a controlled shutdown/restart via the VMware tools is lost. Worth trying if you want to rule out performance issues caused by tools.

Note 4: Tip - remember to remove any mounted ISO from the VDI as this can cause occassional CPU spikes spikes (specific occurrence - have noticed vmware-remotemks.exe spike ocassionally when have a vSphere client console connection open.)

Note 5: Tip - just a hunch that it might be beneficial to set the WorkstationAgent.exe process priority to high  (to stop XenDesktop becoming temporarily unavailable.) The below script will do this:

' Title: Start a Process with a Base Priority

' References: technet.microsoft.com
' Instructions:
' Change const strProcessName =
' Change const priority =

Const strProcessName = "WorkstationAgent.exe"
Const Normal = 32
Const Low = 64
Const High = 128
Const BelowNormal = 16384
Const AboveNormal = 32768
Const Priority = High

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set objStartup = objWMIService.Get("Win32_ProcessStartup")
Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")

Set objConfig = objStartup.SpawnInstance_
objConfig.PriorityClass = Priority

errReturn = objProcess.Create(strProcessName, null, objConfig, intProcessID)

Save as something like priorityScript.vbs

Appendix: VMware Tools Component Feature Descriptions

Toolbox
Utilities to improve the functionality of this virtual machine

Vmware Device Drivers
Drivers used to enhance the performance of your virtual machines
Memory control driver
Driver to provide enhanced memory management of this virtual machine
Thin print
enable automatic printing to host computer's printers
Paravirtual SCSI
Driver to enhance the performance of your virtual SCSI devices
Mouse driver
Driver to enhance the performance of your virtual mouse
Shared folders
Allows file to be shared between this virtual machine and your host computer
SCSI driver
Driver to enhance the performance of your virtual SCSI devices
SVGA driver
Driver to enhance the performance of your virtual video card
Audio driver
Driver to provide audio for virtual sound card
VMXNet3 NIC Driver
Driver to enhance the performance of your virtual network card
VMCI Driver
Driver to allow virtual machines to communicate with applications on host and with other virtual machines using datagrams and shared memory
Volume Shadow Copy Service
VSS Support for Windows guest OS
Wyse Multimedia Support
Driver to enhance your remote desktop multimedia experience

Guest SDK
Allows applications in this guest to access information about virtual machine state and performance
WMI Performance Logging
enable performance monitoring between the guest SDK API and the VMI environment

Comments