So you’ve got a use case for Citrix Personal vDisk (PvD) and you want to integrate it into your existing XenDesktop environment with your perfectly architected profile management solution – should be pretty straightforward, right?  It certainly can be, but you really need to understand the key design considerations when implementing PvD.  I’m going to talk about one of those key design considerations in this article – how we split the PvD VHD between the “profile” and “apps”.  And it might even be the most important consideration since you can really waste a lot of money if you use the default setting with a properly architected profile solution (and I’m giving everyone the benefit of the doubt that you’ve read Dan’s article and you religiously follow Microsoft’s latest best practices in this area)!

Besides picking the right size for your PvD VHD (10 GB, 15 GB, etc.) and determining what type of storage it should sit on (same storage as the VM or different, a type of storage repository that supports thin provisioning like NFS or something else, etc.), this design consideration – determining how to split the VHD container between the profile and apps – is very important.  Side note: if there is enough interest and you’d like to hear more about those other design considerations I just mentioned, drop me a comment and I can speak to those in a future article.

Since you already probably saw the title of this article, you can probably guess how we cut up the VHD container by default – 50% for the “profile” and 50% for the “apps”.  That means if you select 10 GB for the size of the PvD, 5 GB will be allocated for the profile and 5 GB will be allocated for the apps.  After enabling PvD, if you log into Desktop Director and view the machine’s details, you can see this default 50/50 split in action.

And the way this works is the “profile” portion is everything under C:\Users (in a Win7 environment) and the “apps” portion is effectively everything else.  And while that default setting of 50/50 might work in some environments, it’s probably not going to be optimal in most of the environments that I touch.  And that’s because I’m almost always leveraging folder redirection for the user shell folders (Documents, AppData\Roaming, etc.) and I also use UPM in certain scenarios.  So if we’re using folder redirection for ALL machine independent shell folders like Microsoft wants us to, what’s really left under C:\Users?  Just the machine dependent folders and files (AppData\Local, etc.) and the ntuser.dat file (this is the registry portion of a user’s profile which gets mounted as HKCU in case you forgot).  And that ntuser.dat file might be a few megabytes max…the local version of AppData and its wonderful subdirectories (like Temp) might be several dozen megabytes but it’s typically not gigabytes worth of data.  So would we really want to effectively “waste” 5 GB of our precious PvD VHD space for the “profile” portion?  Probably not.  Well, I wouldn’t recommend it if you like money anyway.

So what do we change it to and how do we change it?  After you install PvD and seal the image by updating the inventory and shutting it down (or you can always do it later but I’d recommend doing this from the get-go), you simply modify a registry key and tweak the ratio.  And that key is called ‘PercentOfPvDForApps’ and it’s found under ‘HKLM\Software\Citrix\personal vDisk\Config’.

And I’d recommend changing the value to something like 90 in decimal (note our documentation says “80” but that might even be a bit too low).  Changing this value from 50 to 90 will help us conserve precious storage by allowing more space for the “apps” portion, while also being a bit conservative and allowing 1 GB for the “profile” portion.

I recommend doing testing in your particular environment with your particular profile solution to see what you can safely set this to.  Maybe its 75 since you don’t redirect every folder like most of the environments I see out there.  Maybe its 95 because you use a 3rd party profile solution or redirect every folder in the world and delete cached copies of profiles.  I don’t know what it will be in your environment – but I’m hereby recommending a 90/10 split as a baseline with a properly architected profile solution!

One other “trick” that you’ll want to do if you’re using PvD with a profile management solution like UPM and folder redirection – tell PvD to NOT cache the profile within the personal vDisk area (the P drive by default) and instead put it on the C drive where UPM expects it.  This allows you to save even more precious storage space within that P drive. You do this by changing another setting in the registry – the key is called ‘EnableUserProfileRedirection’ and it’s located in the same place as the other regkey we just tweaked above.  It will have a default value of ‘1’ and you’ll want to change it to ‘0’.

The final step is to update the inventory and validate the changes took effect.  If you log into Desktop Director again and view the machine or machines in question, you should see something like this (9 GB dedicated for apps and ~1 GB dedicated for the profile).

Hopefully this saves you a little time and some cash in your future XD/PvD deployments.  Maybe next time we’ll talk about some of the other key design considerations related to PvD that I mentioned, such as sizing the PvD VHD, the impact to scalability and login times, and storage considerations.

By the way – if you’re looking for a technical overview of PvD, please make sure to check out my last article that I authored shortly after the RingCube acquisition.  I also recommend checking out the recently released PvD FAQ and Planning Guide as well.  Good luck out there!

Cheers, Nick

Nick Rintalan, Senior Architect, Citrix Consulting