Posts Tagged ‘VMware Tools’

hgfs registry value causes issues with Terminal Services VMs

December 13th, 2008

I originally brought this up back in October with my Tip for virtualization Citrix servers invovling user profiles post.  I’m bringing it up again because this week VMware updated their knowledgebase document 1317 Windows Guest Cannot Update hgfs.dat and it’s missing a piece of key information that administrators need to be aware of.  I’m not going to rehash the whole hgfs registry value again.  You can read the details about that in my October post linked above.  The workarounds for hgfs issues caused by VMware Tools do work, however, what’s not mentioned is that a re-installation or upgrade of VMware Tools will re-install the hgfs value back in the registry thus introducing problems again.  With the amount of ESX/ESXi version upgrades coming from VMware lately, which in turn cause VMware Tools upgrades, this scenario is not going to be uncommon for anyone who is virtualizing Terminal Services or Citrix.  Add to that, VMware even recently released an interim VMware Tools upgrade patch subsequent to ESX 3.5.0 Update 3 (ESXe350-200811401-T-BG).

It should be noted that the hgfs registry value is associated with VMware shared folders technology (not used with ESX/ESXi) and only gets installed during a Complete installation type.  A Typical installation type will not install the hgfs registry value.  I perform Complete installation types of VMware Tools because I make use of the VMware Descheduled Time Accounting Service.  My virtualized Citrix servers have been impacted by this twice:  The first time when I orginally rolled out the virtualized Citrix servers.  The second time a few months later I discovered hgfs was installed again after a VMware Tools upgrade.  I’ve asked VMware to update hgfs related KB articles with the piece about the VMware Tools upgrades.  As I pointed out in my October article, one of the nasty side effects of the hgfs value on Terminal Services VMs is the constant growing of the user profile folders under \Documents and Settings\.  Left undiscovered for a while and it becomes a pretty big mess and the speed at which ugliness infiltrates \Documents and Settings\ is compounded by the number of Terminal Services users logging on to the server throughout the day every day.

Tip for virtualizing Citrix servers involving user profiles

October 25th, 2008

I virtualize Citrix servers and have had great success since VI3 was released. One of the things I learned along the way was a conflict that was created when introducing VMware Tools to a Citrix server.

My Citrix users receive mandatory profiles when their first session is established with the Citrix server. Although the user is assigned a mandatory read only profile which lives in an isolated directory on each Citrix server, a profile bearing the user’s account name is still created under \Documents and Settings\<username>\. This is normal Windows Terminal Services behavior. Now, what’s supposed to happen is when the user logs off their Citrix session, the automatically created profile is supposed to be automatically deleted. However, the installation of VMware Tools will prevent the clean up and deletion of the profile. The next time that user logs on, a new profile folder is created with a .001 extension. Then .002.  Then .003.  And so on.  On a larger scale with many users logging on and logging off, many profile folders are created and then orphaned. Left undiscovered, several hundred orphan folders will be discovered within just a day or two depending on how many sessions the Citrix server handles.

The root cause is that a file named \Documents and Settings\<username>\Application Data\VMware\hgfs.dat cannot be deleted by Windows and thus the folder structure must remain in place. The VMware Tools installation is partly responsible for the conflict. When VMware Tools is installed, it appends a value in the Windows registry to

HKEY_LOCAL_MACHINE\

SYSTEM\

CurrentControlSet\

Control\

NetworkProvider\

Order\

ProviderOrder

The value of hgfs is appended.

The fix is simple. Right-click ProviderOrder and choose Modify. In the Edit String Value dialog box, edit the value data string and remove the characters ,hgfs (including the leading comma). For example, if the data string contains LanmanWorkstation,hgfs then change it to LanmanWorkstation. If the value data string contains only hgfs, then erase it and leave the value data string empty.

Problem solved. Unfortunately only for the time being. The next time you upgrade VMware Tools on the Citrix VM, hgfs will be appended back in the registry and once again an accumulation of folders under \Documents and Settings\ will begin.

Looking for VMware Tools?

October 25th, 2008

Are you looking for VMware Tools? Maybe just curious where they come from?

Look no further than your ESX host under /vmimages/tools-isoimages. There you’ll find the .iso files that mount as images into the virtual CD-ROM tray when the “Install/Upgrade VMware Tools” command is passed to the ESX host for a particular VM or group of VMs.

What else is in /vmimages? Browse to the floppies folder and you’ll find vmscsi-1.2.0.2.flp which is the optimized BusLogic SCSI driver for Windows guests. Although this driver will work for all Windows guest types, it’s best used with Windows NT and Windows 2000. Windows XP, Windows 2003, and beyond achieve better performance using the LSI Logic SCSI driver (which by the way can be downloaded from the LSI Logic website by following this link)