Environment: Windows Server 2003 Service Pack 2, Citrix XenApp 5 Roll Up Pack 7, Citrix User Profile Management 3.2, VMware ESX 4.0.
Problem description: in some situation, when using Terminal Server roaming profiles or Citrix UPM, users connecting to a Terminal Server may have their profile duplicated in the form of user.domain.001, user.domain.002, user.domain.003 and so on.
Problem cause: the problem is caused by a bug in the VMware tools “shared folder” feature. Such feature is installed when VMware tools are installed with the “Complete” option. When a user logs off, the Terminal Server tries to copy the hgfs.dat file back to the profiles folder but the operation fails because VMware keeps the file locked with exclusive access. When the user logs in again, a new and duplicated user profile folder is created.
Problem solution: the “shared folder” feature can be disabled by modifying a registry key (the feature is not used by ESX and GSX Server).
- Disable users logons on the server;
- When all users are logged off delete the profiles folders in c:\Documents and Settings\;
- Open the registry editor: regedit;
- Find the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order\
- Open the “ProviderOrder” key and delete the the words “hgfs” or “vmhgs” or “vmhgfs” present in the string ;
- Reboot the server.