I thought I would let you know about a little gotcha that I bumped into this issue yesterday.

So you are using Citrix User Profile Manager (a.k.a Profile management), you have installed it on machines running on VMware, (possibly in your XenDesktop or XenApp set up) probably because no-one has told you that you can get XenServer for free! 

You have your User profile Manager GPO settings to delete the cached local profiles when the user logs off, only they won’t…..

…read on.

I had VMware tools installed on my XenApp server running on ESX 3.5 (I have some on XenServers too, I have make this clear before the XenPolice come and get me…)

I had installed the tools using the complete install. Little did I know that with a roaming profile of any variety this can cause issues. The “Shared Folders” option in VMware tools put a little file in your users profile, which gets locked by a running process. Consequently if you have a GPO set up to delete the users profile at log off, the system can’t because of this pesky little file, namely;

C:\Documents and Settings\userid\Application Data\VMware\hgfs.dat

Your Profile management log (C:\Windows\system32\LogFiles\User Profile Manager\UserProfilemanager.log) will probably have an entry in it like the following: (if you have all the log options enabled in your GPO that is!)

2009-06-03;11:44:31.456;ERROR;PCNAME;johncarthy4;3;3640;DeleteDirectory: Deleting the directory <C:\Documents and Settings\johncarthy4\Local Settings\Application Data\VMware> failed with: The directory is not empty. 

Here’s the quick fix:

1. If its XenApp log all your users off the server, preferably politely, send a warning message or if your feeling particularly ruthless a quick “session reset” will surely get them ranting at the helpdesk…

2. Login as an Administrator go to Control Panel – Add remove Programs.

3. Find VMware Tools and choose the “change” option.

4. Change the “shared folders” to “This feature will not be available”.

5. Click “next”, Click “Modify” and click “finish”.

6. Restart the server / PC and now it’s a good time to clean up those half deleted profiles.

7. Its best to use the My Computer – Properties – Advanced – User Profiles and select the remnant profiles and delete from here, this way you will always see any issue as Windows will kindly inform you of any difficulties by means of an error message…

Now I also found this to be the case on an XP vm that I had running on the same VMware server. The bizarre thing is that even if you click over the tools icon next to the clock, and check the settings, it said that the shared folder option was disabled, herein lies the difference, you will still see this issue even if the system is set to use Shared Folders, you just have to make sure it isnt installed at all.

Here’s the other slightly longer fix:

1. Download XenServer.

2. Install your VM’s on that.

3. Install Profile manager.


I hope this helps some of you.