As indicated by What’s new in Citrix App Layering 4.1 onwards –https://docs.citrix.com/en-us/citrix-app-layering/4/whats-new/what-s-new-in-app-layering-4-1.html. User layers has been in labs for a number of version updates now.
A User layer allows you to preserve users’ data and configuration settings. Essentially attaching a VHD during login allowing user profile settings, data, and user-installed applications in non-persistent VDI environments. This provides user flexibility with administrative control in situations where dedicated VDI would traditionally be required(replacement for PVD)
Below image gives context to where User Layers fit in the App layering priority list.
This article is intended to be used to help setup/understand and test the user layers in a test environment before implementing in production. It is NOT advisable to use this in production until it is out of Labs.
NOTES:
- Supported only on
- Windows 7, 64-bit
- Windows 10, 64-bit
- Available Citrix XenDesktop or VMware Horizon View
- You set Elastic Layering on an Image Template to Application and User Layers, so that the Layered Image supports User Layers.
- VHD is created in ELM Appliance Shared “\Users\domainIname\username\OS-Layer-ID-in-hex_OS-Layer-name\username.vhd”. This the default is no other storage location is added and assigned to users/group.
- User Layers are based on the same technology as Elastic Layers, and therefore share the same limitations
- When a user first logs into desktop, a User Layer is created.
- Storage Locations can be added under System\Storage location can be assigned to groups
- Storage locations are listed in priority order , If a user belongs to more than one group and those groups are assigned to different storage locations, the person’s User Layer will be stored in the highest priority storage location.
- Multiple access to VHD is not allowed and will result is message “Attach a User Layer because it is in use” being displayed and no information being saved.
- Policy to reboot device on logoff is required to unlock the VHD and revert back to original image (PVS/MCS does this automatically), not using these provisioning method will cause issues after first login.
-
Default Max size of a User Layer is 10 GB (if no manual override is specified)
To change default max size , add the following registry override
HKLM\Software\Unidesk\Ulayer\ DWORD : DefaultUserLayerSizeInGb VALUE: Size required
Enable Feature & Publish Layered Image
Step 1: Browse to System > Settings and Configuration >Labs Section. Select User Layer (Full) and Click Save
Step 2: Adjust the template, browse to Images, Right Click Image Template and Click Edit Template. Select User Layer Full in Layered Image Disk.
Step 3:Then Click Publish Layered Image
Step 4:Then Click Publish Layered Image
Step 5: The published layered image will then be updated to include the User layer setting enabled.
Add Storage Location
Step 1 : Create a share with the below permissions on a file share:-
In my case “Group to receive user layers” is “WILKYIT\Domain Users”
Step 2: Browse to System > Storage Locations, Click Add Storage Locaiton
Step 3: Add Name & the UNC Network Path (\\LAB-DC1\UserLayers$. Click Down Arrow
Step 4: Search for Domain Users (an example i am using), Select the Group. Click Down Arrow
Step 5: Leave default messages when layer is in use/unavailable/system not reset after user sign out. Click Down Arrow
Step 6: Click “Add Storage Locations”
Step 7: Confirm additional of storage location on the appliance.
Testing
Step 1: Log in a user (in my case ctxuser1)
Step 2: Confirm the VHD is created in the assigned storage location (Not the default)
As per NOTES, The location is in the following format “StorageLocation\Users\domainIname_username\OS-Layer-ID-in-hex_OS-Layer-name\username.vhd”
Step 2: Logging off the Windows 10 image , you’ll the VHD has increased in size which will be the
Taking a look inside the VHD created (using read-only 7zip) you can see the following:
Troubleshooting:-
Two log files are created to give some information.
- Diag – indicates logon user,sid,machine,logon-time
- Logoff – as by the name the logofff user,sid,machine,logon-time
Further debug user layers, the following log file “ulayersvc” can be found “C:\ProgramData\Unidesk\Logs” which contains details around attaching disk, detaching etc and be a good place to start if you have any issues attaching VHD.
I created another share but it is still going to default location how do I change that?
Check the storage location and group assigned to it. By default if users is not a member of the group specified in this storage location it will use default.
Hi, I have two storage locations and for each storage location I have signed a group. When I login to the pvs server how does it know where to set my user layer profile? I mean how does the process go, does the applayering agent know that?
Hi,
I want a 40GB user layer for DefaultUserLayerSizeInGb , I just enter 40 (Hexadecimal value) in the dword key?
Decimal value of the Gb requires
Worked fine, Thanks!
If I change the user layer share in ELM, hows do I replicate that to the registry of the target devices?
Thanks for good details on setting up the User layer share. In the Testing section you mention to verify the User Layer (UL) is going to the designated UL share – not the Default share location. How do you force it to go there? I’m seeing an issue where my test logins somewhat randomly send me to one or the other between the default and the UL. Citrix suggests to change the path of the Default so the UL will go there for sure, but won’t that impact other things like the Elastic layers?
During the Step 4 of selecting user, and step 6 of specifying the storage location you need to ensure all users are being capture in the group provided.
Hello, We’ve implemented Full User layers on the latest version of ELM and are having Major issues with Windows Apps and Windows Store Apps. We are also having issues with Search/Indexing not working properly. We are Using the Image to create random MCS machines. The Windows 10 apps want to reinstall each time the user logs in and the 3rd time they login they completely stop working. I have a case open with Citrix and it has been open for 26 days. They’ve been terrible at troubleshooting this issue. I’m just wondering if anyone has seen this behavior.
Un trou que de Gea fait un travail formidable rafistoler quand appelé on.
I want to change the default User Layer Storage location for my App Layering 4 environment (v 20.3.0.12 ELM appliance). I changed the default location setting and moved all my existing user layers, but when I sign in to a session a new folder gets created in the old default location. What do I need to do in order for my new default location setting to take effect?
P.S. I know I can add a new Storage Location and assign that to an AD group with my users in it. That works just fine. It’s just the default location setting that isn’t working as I expected.
I may have answered my own question. I’ll put the info here in case anyone else has the same question.
This article helped me: https://support.citrix.com/article/CTX222107
In short, the default location is baked into the image and cannot simply be changed in the admin interface. Changing it there (in the admin interface) only affects images you’ll create later.
To update the default location for user layer files, look in the Registry in your image. The value is HKEY_LOCAL_MACHINE\SOFTWARE\Unidesk\ULayer\RepositoryPath. Change that to point to your new default location, create an snapshot of that image, and recompose your pool(s) from that snapshot. If you haven’t already, don’t forget to copy or move your user layer folder tree!