Microsoft User Profile Disk with Citrix XenApp & XenDesktop

In the last couple of weeks I’ve been working on my upcoming whitepaper Turbo Containers Reference Architecture for Citrix, VMware & Microsoft RDSH Environments and also reviewing Claudio Rodrigues upcoming book RDS 2012 R2 Complete.

You’ve probably heard about Microsoft User Profile Disk (UPD) and learned that it only works for pure RDSH environments. It wasn’t until reviewing Claudio’s book and working on my whitepaper that got me thinking. What if that worked on Citrix…

ControlUp-blog-images-Calculate-user-profile

If you take a look at the post Troubleshooting Slow Logons Caused by a Large User Profile by ControlUp you’ll learn that it’s not only the size of the profile that matters, it’s also the number of files.

That got me thinking and worrying at the same time. You see, to be able to keep changes in Turbo Containers we need to roam the folder AppData\Local\Spoon\Containers. As you can see below from some small lab testing the folder contains 1984 files in 1208 folders. Yes it works fine with Citrix Profile Management and streaming, but I’m worried.

User Profile Disk Citrix 01

But that’s not the biggest problem. As more and more companies migrate to Office 365 the biggest challenges are the huge OST files. Yes Microsoft & Citrix recommends redirecting the file to a file share.

It’s not the optimal way, it’s recommended because it’s the ONLY way without 3 party products

Check the post Getting Started with Office 365 to get all the registry hacks to disable all annoying splash screens.

Last year FSLogix won Best of Synergy 2015 for their Profile Container Technology and this year they released FSLogix Office 365 Container that takes care of the OST part so it can be easily integrated with any other UEM solution. FSLogix supports both VDI & RDSH while LiquidwareLabs Profile Disk only support VDI.

That was before I sent an email and by pure luck included Claudio on CC. He had a theory which I instantly tested successfully. When we think about it, it’s INCREDIBLE that nobody has though about it before. The solution is so simple. Let’s do it.

User Profile Disk Citrix 02

User Profile Disk with Citrix

Head over to your file server and create a share where you’re going to host those UPD files. Add the computer objects with full NTFS rights and Share Permissions.

user-profile-disk-citrix-15upd-01

Then run the following command in PowerShell to create the User Disk Template.

User Profile Disk Citrix 10

The last digit 5 defines the size in GB of the VHDX template.

Now with all Profile Container technologies there’s a limitation that only allows the VHDX to be mounted once. Therefore you’ll need to create a folder for each OS/Silo and copy the template inside each of those sub folders.

User Profile Disk Citrix 05

To enable User Profile Disk in on your Citrix Servers run the following PowerShell command as a startup script:

You’ll also need to Enable the Policy Delete cached copies of roaming profiles in Computer Configuration – Administrative Templates – System – User Profiles.

Again, please be aware that you need to create a Group Policy for each of those OS/Silos pointing to the correct sub folder.

User Profile Disk Citrix 08

And that’s it. I’ve successfully tested this on Windows 8.1, Windows 10 1511/1607 (Anniversary Update), Windows Server 2012 R2 and Windows Server 2016.

Finally if you take a look at your share you’ll find some rather strange file names. So which VHDX belongs to which user?

User Profile Disk Citrix 04

There’s a great tool from the Microsoft Gallery called Sidder that resolves this problem.

User Profile Disk Citrix 09

FSLogix Killer?

So what now, is FSLogix out of business? Not at all, remember that FSLogix has been working with this tech for 3 years and their Profile Container offers so much more than only the Microsoft Cache Exhange Mode stuff.

More importantly, we’ll probably never see any kind of support from Microsoft or Citrix. So larger organizations will probably happily pay the $10 extra to get support and new innovations to the technology. And did I mention Windows 7 and later, 32 & 64 bit; Windows Server 2008 R2 and later support? Request FSLogix evaluation.

If organizations wants to save money, yes then it’s a go, but if that’s the case why don’t go Pure RDSH and get Microsoft support for UPD out of the box?

User Profile Disk Citrix 11

We want to credit this post to RDS MVP Toby Phipps for initially passing the UPD commands to Claudio back in November 2015.

31 Responses to Microsoft User Profile Disk with Citrix XenApp & XenDesktop

  1. Couple of comments / questions…

    1. I assume login is much faster than UPM or other solutions because the profile is now local to the VM, can you confirm?
    2. Does this work with pooled and non-pooled catalogs?
    3. Now if someone could only figure out how we can migrate profiles between v2 and v5 successfully, then we might be able to get W10 migrations moving in full force.

    Awesome work!

    • Thanks Nick, more test & results coming, running LoginVSI as we speak.

      1. Yes is should be much faster, not in my lab though, but with real world profiles, for sure.
      2. Yes works with both.
      3. Yes indeed, I think you can with FSLogix.

  2. Hello!
    Why we cannot use Citrix Personal disk instead of UPD? Any benefits of UPD?

    Thanks!

  3. Is there a video somewhere of this being set up to make sure I’m not doing something wrong? Every time I log on to Windows 10 1607 with this configured, I get a temporary profile warning…

  4. So does this work on windows2012 xenapp 6.5? From what I understand this eliminates citrix user profile manager?

  5. Hi, I tried running the first powershell command on the file server to create the user user disk template, and I keep getting the following error:

    Exception calling “CreateUserDiskTemplate” : “”
    At line:1 char:1
    + (Get-WmiObject -ns root\cimv2\terminalservices -class win32_tssessiondirectory). …
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WMIMethodException

    am I doing something wrong or missing something here?

    thanks

    • I get the same error message when I run the first powershell command. Any clues?

      • In our case we had to enable Remote Desktop in the VDI master machine for these commands to work

  6. I have this problem with UPDs that Chrome really isn’t into junction points with its TEMP Folder (https://bugs.chromium.org/p/chromium/issues/detail?id=413889). So I want to exclude the “%USERPROFILE%\AppData\Local\Temp” from the UPD and I guess I can alter the XML config for that? But how? I’m not able to find any documentation for this. Any hints? Thanks! (WS16 with XenApp 7.11)

  7. Do you have an example UvhdRoamingPolicy.xml that you can share? I am having troubles creating one for some reason…

    Thanks in advance!

  8. What happens if you use XenApp and run ‘published app A’ from ‘server X’ and ‘published app B’ from ‘server Y’?
    FSLogix has some logic to handle that “dual access”…

  9. Hello,

    I get it working on W2k12R2 but on Windows10 I get a temp profile after logon. Any ideas?

    Regards
    Martin

  10. Thanks Trond this is just great. Just what i looking for! Works perfect here. Had some really big ussues with native roaming profile oder UPM from Citrix!
    Startmenu and default app settings were not saved with the new profile version v6 and ws16!

  11. Thanks for great tutorial. Do you have any recommendations on what to exclude in the profile on 2012 r2 with xenapp 7.x?

    Is it still best practice to exclude %appdata%\local and locallow?

  12. Hello,

    What about Citrix Support ? Is it an official solution or just a tweak ?

    Can we use it in production environnement for XA 7.13 ?
    Thank you

    Seb

Leave a reply