-
Citrix Profile Management – How to Use One Image to Point to Multiple Profile Management Stores
August 10, 2017
Citrix Virtual Apps and Desktops, XenApp, XenApp/XenDesktop 7.0 - 7.7, XenDesktop 5.x
Guest article by Hal Lange.
Let me set a stage for configuration:
There are multiple XenDesktop Sites for your environment. Either Citrix Provisioning Services (PVS) or Machine Creation Service (MCS) is being used for image deployment. Whether your Sites are Active/Active or Active/Passive doesn’t matter. The only difference between the images will be the Citrix Profile Management (CPM) store that the image points to. As we all know, using the Distributed File System (DFS) for profiles is against Microsoft’s best practices. Using DFS for profiles is a terrible, as well as an unsupported, practice. (Information about Microsoft support policy for a DFS-R and DFS-N deployment scenario).
Now with that said, you are using the policies for CPM configuration in any scenario (GPO, Studio, WEM, etc…). The policies have the CPM store as the only change for each site. My thought was let’s set the CPM service to “Delayed Start”. Citrix has made that an impossible task. That service must be set to Automatic to start correctly. An old standby that I have used, restart the CPM service after the GPO has applied. This works as far as the CPM service. It will now log in and download users’ profiles from the correct store.
Now for the interesting twist. If the CPM service crashes or is restarted, Citrix Director components break. The Logon Duration and Personalization parts of the User Session Details will become unavailable as shown in Figure 1.
What is happening, is that the WMI calls being made by Director to the VDA are broken. You can see this by running the following PowerShell command:
Get-<u>wmiobject</u> -Class "session" -Namespace "Root\Citrix\profiles\metrics"
This PowerShell command will show results for the users that have logged in before the CPM service fails. Any user logging in after the CPM service has been restarted will not be tracked by the WMI counters, which means Citrix Director is broken.
Here are the workarounds attempted:
- Changing the CPM service to Automatic Delayed – This is not allowed by Citrix programming
- Changing the CPM service to Manual – Starting the service via a script after the CPM policy applied. This acts as a restart of the service and breaks the WMI session data.
- System Variable – Setting a system variable to be used by the policy. This would dynamically change the server name but not change the policy. This has the same effect as statically setting a server name and then trying to change it during boot.
I have tried many scenarios to try and get this to work. Citrix has been working on a fix for this as well. This is an issue for changing CPM stores dynamically as well as the CPM service crashing.
The resolution that I have found so far, to be able to keep one image and change CPM stores dynamically by Site is to use a Host entry. I set the policy to a server name that will never exist (e.g. MultiCPMServer.company.com). I then set a policy/scheduled task to add this server to the host file with the IP of the server that I am trying to use for the CPM store.
Example Host file for Site A:
<IP of File Server for Site A> MultiCPMServer.company.comExample Host file for Site B:
<IP of File Server for Site B> MultiCPMServer.company.comWhile this is not the most elegant solution, it is very functional and has worked at every client that needs this. Again…. This will only be used until Citrix resolves the issues with the CPM service breaking WMI.
Now, back to learning what else is broken.
If you have any questions, please send me an email.
Thanks
Hal Lange
One Response to “Citrix Profile Management – How to Use One Image to Point to Multiple Profile Management Stores”
Leave a Reply
August 11, 2017 at 7:35 am
Hi Carl, maybe I misunderstood your scenario, but why not using an AD attribute set at the user level to build dynamically the UPM path?
Regarding DFS-R, it is supported if used it as a backup solution, only 1 active member at the same time. However I wouldn’t recommend it as DFS-R is hard to troubleshoot and when things goes wrong, you have to rebuild the DB. In short stay away even for backup, a good old robocopy script would do the job or maybe the new storage replica in Windows 2016.