Profile Management and VMware
This topic applies to Citrix user profiles on virtual machines created with VMware software such as VMware ESX. It addresses an issue where local profile caches become locked.
If you have set up Profile Management to delete cached local profiles when users log off from their virtual machines created with VMware (in your Citrix Virtual Desktops or Citrix Virtual Apps deployment, say) but the profiles are not deleted, you can use this workaround to overcome the issue.
This issue has been shown to occur when roaming profiles are used on virtual machines created with VMware ESX 3.5, and the Profile Management setting Delete locally cached profiles on logoff is enabled.
The issue occurs because the Shared Folders option in VMware Tools adds a file to the profiles. And the file is locked by a running process thereby preventing profiles being deleted at logoff. The file is C:\Documents and Settings\userid\Application Data\VMware\hgfs.dat.
If you have verbose logging enabled in Profile Management, the log file may detect this problem with an entry such as:
2009-06-03;11:44:31.456;ERROR;PCNAME;JohnSmith4;3;3640;DeleteDirectory: Deleting the directory <C:\Documents and Settings\<user name>\Local Settings\Application Data\VMware> failed with: The directory is not empty.
To work around this issue in a Citrix Virtual Apps deployment on Windows Server 2008:
- Log on as Administrator to the Citrix Virtual Apps server.
- In Citrix Virtual Apps deployments, log off all users from the server.
- In Control Panel, go to Add/Remove Programs.
- Locate VMware Tools and choose the Change option.
- Change Shared Folders to This feature will not be available.
- Click Next > Modify > Finish.
- Restart the server.
- Clean up the half-deleted profiles. Use My Computer > Properties > Advanced > User Profiles, select the profiles and delete them. Windows informs you of any errors trying to delete the profiles.
Note: A separate issue in environments running Profile Management on VMware can result in the creation of multiple sequential profiles. For information about this issue and how to resolve it, see CTX122501.