Microsoft User Profile Disk with Citrix XenApp & XenDesktop

Datetime:2016-08-23 04:09:24          Topic:          Share

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…

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 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.

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 with Citrix

Head over to your file server and create a file share where you’re going to host those UPD files. Then run the following command from PowerShell:

(gwmi -nsroot\cimv2\terminalservices -class win32_tssessiondirectory).createuserdisktemplate("\\dc-01.ctxlab.local\UPD",5)

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 that sub folders.

Create the file UvhdRoamingPolicy.xml and add the following content:

<UvhdRoamingPolicy><RoamingMode>0</RoamingMode></UvhdRoamingPolicy>

This basically tells to include everything, so if anything writes to C:\Users\%username%, the UPD takes over.

To enable User Profile Disk on your Citrix servers run the following command:

(gwmi -nsroot\cimv2\terminalservices -class win32_tssessiondirectory).enableuservhd("\\dc-01.ctxlab.local\UPD\WS12R2","<UvhdRoamingPolicy><RoamingMode>0</RoamingMode></UvhdRoamingPolicy>")

That only creates 3 registry keys so why don’t we use Group Policy Preferences instead?

Please be aware that you need to create a Group Policy for each OS/Silo.

And that’s it. I’ve successfully tested this on Windows 10, Windows 2012 R2 and Windows 2016 TP5.

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

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

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?