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