Step-by-step guide to learn how to work with Users Layers in Citrix App Layering.
More from the Lab!
- Building a Dual-Xeon Citrix Lab: Part 1 – Considerations
- Building a Dual-Xeon Citrix Lab: Part 2 – Hardware
- Building a Dual-Xeon Citrix Lab: Part 3 – Windows and Hyper-V installation
- Lab: Part 4 – Hyper-V Networking
- Lab: Part 5 – NetScaler 11 Architecture and Installation
- Lab: Part 6 – Configure NetScaler 11 High Availability (HA Pair)
- Lab: Part 7 – Upgrade NetScalers in HA
- Lab: Part 8 – Save, Backup and Restore NetScaler 11 configuration
- Lab: Part 9 – Install Microsoft SQL Server 2014 (Dedicated)
- Lab: Part 10 – Citrix Licensing demystified
- Lab: Part 11 – Install XenDesktop 7.6
- Lab: Part 12 – Setup NetScaler 11 Clustering (TriScale)
- Lab: Part 13 – Configure Published Applications with XenDesktop 7.6
- Lab: Part 14 – Citrix StoreFront 3.x
- Lab: Part 15 – Configure SSL in StoreFront
- Lab: Part 16 – StoreFront load balancing with NetScaler (Internal)
- Lab: Part 17 – Optimize and secure StoreFront load balancing with NetScaler (Internal)
- Lab: Part 18 – Secure LDAP (LDAPS) load balancing with Citrix NetScaler 11
- Lab: Part 19 – Configure Active Directory authentication(LDAP) with Citrix NetScaler 11
- Lab: Part 20 – RDP Proxy with NetScaler Unified Gateway 11
- Lab: Part 21 – Secure SSH Authentication with NetScaler (public-private key pair)
- Lab: Part 22 – Ultimate StoreFront 3 customization guide
- Lab: Part 23 – Securing Citrix StoreFront DMZ deployment
- Lab: Part 25 – Upgrade to Citrix StoreFront 3.7
- Lab: Part 26 – Install/Upgrade Citrix XenDesktop 7.11
- Lab: Part 27 – Getting started with Microsoft Azure
- Lab: Part 28 – Getting started with Citrix Cloud
- Lab: Part 29 – Configure XenDesktop And XenApp Service with Microsoft Azure and Citrix Cloud
- Lab: Part 30 – Configure Identity and Access Management in Citrix Cloud with Microsoft Azure AD
- Lab: Part 31 – Configure NetScaler Gateway Service for XenApp and XenDesktop Service in Citrix Cloud
- Lab: Part 32 – Configure MCS with XenDesktop and XenApp Service in Citrix Cloud
- Lab: Part 33 – Configure Azure Quick Deploy with XenDesktop and XenApp Service in Citrix Cloud
- Lab: Part 34 – Configure Site Aggregation for Citrix Workspace in Citrix Cloud with XenDesktop 7.x located on-premises
- Lab: Part 35 – Configure a Hybrid NetScaler MA Service environment in Citrix Cloud
- Lab: Part 36 – Configure ShareFile in Citrix Cloud with StorageZones on-premises
- Lab: Part 37 – Upgrade NetScaler HA pair with NetScaler MA Service in Citrix Cloud
- Lab: Part 38 – How to Configure Full VPN Setup with Citrix NetScaler in CLI
- Lab: Part 39 – Configure Multi-Factor Authentication with Azure MFA Service and Citrix Workspace
- Lab: Part 40 – Getting Started with Citrix App Layering
- Lab: Part 41 – Configure Citrix App Layering
- Lab: Part 42 – OS Layer with Citrix App Layering
- Lab: Part 43 – Platform Layer with Citrix App Layering
- Lab: Part 44 – Application Layers with Citrix App Layering
- Lab: Part 45 – Layered Image Deployment with Citrix App Layering
- Lab: Part 46 – Elastic deployment with Citrix App Layering
- Lab: Part 47 – User Layers with Citrix App Layering
- Lab: Part 48 – Windows 10 and PVS with Citrix App Layering
We discussed in the previous posts of this Citrix App Layering series how to install and configure the appliance. We also reviewed how to work with OS, Platform and Application layers in App Layering and how to deliver them elastically. In this post, we will enable User Layers in Citrix App Layering.
More from this Citrix App Layering series
- Introduction to Citrix App Layering
- Lab: Part 40 – Getting Started with Citrix App Layering
- Lab: Part 41 – Configure Citrix App Layering
- Lab: Part 42 – OS Layer with Citrix App Layering
- Lab: Part 43 – Platform Layer with Citrix App Layering
- Lab: Part 44 – Application Layers with Citrix App Layering
- Lab: Part 45 – Layered Image Deployment with Citrix App Layering
- Lab: Part 46 – Elastic deployment with Citrix App Layering
- Lab: Part 47 – User Layers with Citrix App Layering
- Lab: Part 48 – Windows 10 and PVS with Citrix App Layering
- Best Practices for Citrix App Layering
What are User Layers?
User Layers are layers delivered elastically that allow users to persist profile settings, data, and applications in non-persistent VDI environments.
When you enable User layers on a layered image, the data, settings and user-installed applications for each user are persisted between sessions and saved into a dedicated .vhd file.
Applications installed by a user locally become part of the User layer, same for files and registry changes.
You can enable the following types of User layers:
- Full – All data, settings, and locally installed apps are saved.
- Office 365 – (VDI) Only Outlook data and settings are saved.
- Session Office 365 – (RDSH) Only Outlook data and settings are saved.
For this lab, we will work with Full User Layers.
Requirements
For this lab, you need the following:
- Citrix ELM installed and configured.
- OS Layer imported.
- Platform Layer created.
- Few Application Layers published (in the image or elastically) but it is optional. You can do User layers without App Layers.
- Windows 7 & 10 x64 are the only OS supported by this feature.
- At this time Windows 10 1809 is not supported.
Best Practices for User Layers in Citrix App Layering
- Deploy User Layers for Pooled Desktops only. The feature is not compatible with static desktops.
- Configure auto-reboot after logoff.
- Consider using User Profile Management (UPM) software to manage user profiles when implementing User Layers.
- Do not allow users to install Microsoft Office, Offfice 365, Visual Studio, VPN Clients or applications that require boot level drivers.
- Add specific storage locations for User layers, rather than allowing user data to be saved on the appliance’s main file share.
- Apply NTFS permissions to the Users folder where the personal vDisks are stored.
- Backup User Layers repository
Configure User Layers in Citrix App Layering
As stated in the requirements, Users layers are only compatible with Windows 7 and Windows 10 64bits. And not all versions of Windows 10 are compatible at this time. The latest release 1809 is not compatible.
For this lab, I’ve created a new OS Layer with Windows 10 1803 x64 and added a Platform Layer for this layer.
Steps for the OS Layer (1803_OS):
- Create Virtual Machine (4vCPU & 8GB, 80G) with Hyper-V (Legacy NIC) or VMware (VMXnet 3)
- Booted with ISO File Windows 10 Pro 1803 from Microsoft
- VMware Tools (complete)
- Install Citrix Optimizations + Disable IPV6
- Install App Layering Machine Tools
- Disable UAC
- Reboot
- Shutdown
See Lab: Part 42 – OS Layer with Citrix App Layering for more details.
Steps for the Platform Layer (1803_PLATF_VDA):
- Join the domain
- Reboot
- Install VDA + Workspace App
- Reboot
- Install PVS Target Device
- Reboot
- Add Write Cache disk (20GB) from the VM template and install it
- Shutdown for Finalize
- Remove the Write Cache disk from the virtual machine
- Finalize in the ELM console
See Lab: Part 43 – Platform Layer with Citrix App Layering for more details.
Create a new template for Windows 10 1803:
- Name: 1803_TEMPLATE
- OS Layer : 1803_OS
- Application Assignment: N/A
- Connector: PVS
- Platform Layer: 1803_PLATF_VDA
- Layered Image Disk:
- Layered Image Disk Filename: 1803_TEMPLATE
- Layered Image Disk Size (GB): 100
- Sysprep: Not generalized
- Elastic Layering: Application Layering
- User Layer: Full
See Lab: Part 45 – Layered Image Deployment with Citrix App Layering for more details.
Note: User Layers are only compatible with Pooled Desktops (MCS, PVS, etc).

Confirm to create the template.

In this example, we are publishing the template directly to our PVS Infrastructure.
Note: User Layers logs are located in C:\ProgramData\Unidesk\ulayersvc.log.
Let’s take a look at the logs to analyze how User Layers are mapped or created.
The first step for the User Layer Service is to look for the OS Layer name and ID. This will be used to prevent the mapping of User Layers that have been created on a different OS Layer.
1 2 3 4 5 6 7 8 9 |
2018-12-28 15:04:11,796 INFO 8 UserLayerService: Finding or creating user layer for user CITRIXGURU\user1 2018-12-28 15:04:11,796 INFO 8 WindowsId: Impersonating CITRIXGURU\user1 2018-12-28 15:04:12,124 INFO 8 ShareDataSource: Splitting default share Default Location(524288) 2018-12-28 15:04:12,186 INFO 8 Impersonator: Entering Self impersonation context 2018-12-28 15:04:12,186 INFO 8 WindowsId: Impersonating NT AUTHORITY\SYSTEM 2018-12-28 15:04:12,186 INFO 8 MachineIdentityService: ImageInfo path: C:\Program Files\Unidesk\Etc\ImageInfo.json 2018-12-28 15:04:12,202 INFO 8 MachineIdentityService: ImageInfo path: {"OsLayerId":2031619,"OsLayerGuid":"59f95958-e99b-4f41-89fc-42adaf5f562f","OsLayerName":"1803_OS"} 2018-12-28 15:04:12,217 INFO 8 MachineIdentityService: ImageInfo: 2031619, 1803_OS 2018-12-28 15:04:12,217 INFO 8 WindowsId: Finished impersonating NT AUTHORITY\SYSTEM |
The second step is to look for existing disks.
1 2 |
2018-12-29 18:58:55,468 INFO 10 UserLayerService: Searching for user layer for 'CITRIXGURU\user1' using pattern '\\10.0.0.10\Layers\Users\CITRIXGURU_user1\210008_*\user1.vhd' 2018-12-29 18:58:55,484 INFO 10 UserLayerService: Didn't find user layer for user for 'CITRIXGURU\user1' using pattern '\\10.0.0.10\Layers\Users\CITRIXGURU_user1\210008_*\user1.vhd' |
The User Layer Service will also check if we are enforcing Quota for the User Layers.
Note: The User layer size is set to a maximum of 10GB by default. You can change the maximum size, however, by defining a quota for the User layer share. If a quota is defined, the User layer will be configured to be a maximum of that size.
You can update the quota with the following registry keys:
Registry Root: HKLM\Software\Unidesk\Ulayer
Note: you can also enforce hard quotas using Microsoft File Server Resource Manager (FSRM).
Then it is time to create the User Layer.
1 2 3 4 5 6 7 8 9 |
2018-12-29 18:58:57,578 INFO 10 UserLayerCreationService: Creating a 10.0 GB layer for user CITRIXGURU\user1 at \\10.0.0.10\Layers\Users\CITRIXGURU_user1\210008_1803_OS\user1.vhd 2018-12-29 18:58:57,578 INFO 10 WindowsId: Impersonating CITRIXGURU\user1 2018-12-29 18:58:57,859 INFO 10 WindowsId: Finished impersonating CITRIXGURU\user1 2018-12-29 18:58:57,859 INFO 10 VirtualDiskService: Attaching virtual disk '\\10.0.0.10\Layers\Users\CITRIXGURU_user1\210008_1803_OS\user1.vhd' 2018-12-29 18:59:03,609 INFO 10 UserLayerCreationService: Format disk with label 'UserLayerVolume' 2018-12-29 18:59:08,500 INFO 10 NativeMethodInterceptor: Native method 'CreateFile' took '1.055959' seconds to execute. 2018-12-29 18:59:08,766 WARN 10 BaseTransaction: Transaction 'Attach Disk' is being implicitly rolled back 2018-12-29 18:59:08,766 INFO 10 VirtualDisk: Removing volume cache entry '\\?\Volume{50c6b55a-0000-0000-007e-000000000000}\' 2018-12-29 18:59:09,313 INFO 10 UserLayerCreationService: Finished creating new User Layer VHD |
Note: if you have slowness during the logon. You can take a look at the ‘CreateFile’ duration to determine if this is related to App Layering.
And then open the user disk:
1 2 3 4 5 6 7 8 9 10 11 12 |
2018-12-29 18:59:09,313 INFO 10 UserLayerService: Returning user layer path \\10.0.0.10\Layers\Users\CITRIXGURU_user1\210008_1803_OS\user1.vhd 2018-12-29 18:59:09,313 INFO 10 UserLayerAttachDetachService: Opening user disk '\\10.0.0.10\Layers\Users\CITRIXGURU_user1\210008_1803_OS\user1.vhd' for 'CITRIXGURU\user1' 2018-12-29 18:59:09,313 INFO 10 UserLayerAttachDetachService: Open with lock timout '120' seconds, '5' retries if locked 2018-12-29 18:59:09,313 INFO 10 WindowsId: Impersonating CITRIXGURU\user1 2018-12-29 18:59:09,344 INFO 10 UserLayerAttachDetachService: ExtendedDiagRetentionCount=5 2018-12-29 18:59:09,359 INFO 10 WindowsId: Finished impersonating CITRIXGURU\user1 2018-12-29 18:59:09,359 INFO 10 VirtualDiskService: Attaching virtual disk '\\10.0.0.10\Layers\Users\CITRIXGURU_user1\210008_1803_OS\user1.vhd' 2018-12-29 18:59:09,609 INFO 10 UserLayerRepairService: Repair User Layer: user 'CITRIXGURU\user1', uepFolder '\\10.0.0.10\Layers\Users\CITRIXGURU_user1\210008_1803_OS' 2018-12-29 18:59:09,609 INFO 10 UserLayerRepairConfigFileService: Looking for user layer repair config '\\10.0.0.10\Layers\Users\CITRIXGURU_user1\210008_1803_OS\UserLayerRepair.json' 2018-12-29 18:59:09,672 INFO 10 UserLayerRepairConfigFileService: repair config file not found '\\10.0.0.10\Layers\Users\CITRIXGURU_user1\210008_1803_OS\UserLayerRepair.json' 2018-12-29 18:59:09,672 INFO 10 UserLayerRepairService: did not find a repair config file for user 'CITRIXGURU\user1' in '\\10.0.0.10\Layers\Users\CITRIXGURU_user1\210008_1803_OS' 2018-12-29 18:59:09,672 INFO 10 UserLayerRepairService: Repair User Layer: no layer revisions configured for repair |
Add version.
1 2 3 4 |
2018-12-29 18:59:09,781 INFO 10 Windows10UserLayerPostMountService: Windows version changing from ?? to 17134.1.amd64fre.rs4_release.180410-1804 2018-12-29 18:59:09,799 INFO 10 Windows10UserLayerPostMountService: User layer Windows version change for user CITRIXGURU\user1. Change from ?? to 17134.1.amd64fre.rs4_release.180410-1804 2018-12-29 18:59:09,799 INFO 10 Windows10UserLayerPostMountService: ULayer format changing from 0 to 1 2018-12-29 18:59:09,799 INFO 10 Windows10UserLayerPostMountService: User layer format version change for user CITRIXGURU\user1. Change from 0 to 1 |
Let’s take a look at the storage location defined in the ELM console. In this location, the Citrix App Layering Guest Service created a new folder for the user (<DOMAIN>_username) and a sub-folder for the OS Layer (OSLayerID_OSLayerName).
Then a new .vhd file will be created (username.vhd).

Note: User Layers can only be used on the OS Layer they were created. It is not possible to “roam” User Layers on Layered Images created from different OS Layers.
You may also have noticed that the Citrix App Layering Guest Service automatically created a logonX.txt file during the logon. This file contains information about the session.
1 2 3 4 |
User: CITRIXGURU\user1 Sid: S-1-5-21-3702114223-2806428234-104617735-1145 Machine: VM01 Log-on time: 12/29/2018 6:59:09 PM, Local |
The User Layer is now mapped in the session. From now on, the data and settings, and any applications installed locally are saved in this User layer.
After few logons and logoffs, the User Layer folder will look like below:

Note: LogoffX.txt files contain an export of the ulayersvc.log file generated for that session.
As a reminder, you must configure auto-restart after a logoff or your users will get the following popup after logon:

You can configure that in PowerShell for a Delivery Group.
1 |
Set-BrokerDesktopGroup -Name "Windows10-1803" -ShutDownDesktopsAfterUse $true |
That’s all for User Layers. I hope it helped.
More from the Lab!
- Building a Dual-Xeon Citrix Lab: Part 1 – Considerations
- Building a Dual-Xeon Citrix Lab: Part 2 – Hardware
- Building a Dual-Xeon Citrix Lab: Part 3 – Windows and Hyper-V installation
- Lab: Part 4 – Hyper-V Networking
- Lab: Part 5 – NetScaler 11 Architecture and Installation
- Lab: Part 6 – Configure NetScaler 11 High Availability (HA Pair)
- Lab: Part 7 – Upgrade NetScalers in HA
- Lab: Part 8 – Save, Backup and Restore NetScaler 11 configuration
- Lab: Part 9 – Install Microsoft SQL Server 2014 (Dedicated)
- Lab: Part 10 – Citrix Licensing demystified
- Lab: Part 11 – Install XenDesktop 7.6
- Lab: Part 12 – Setup NetScaler 11 Clustering (TriScale)
- Lab: Part 13 – Configure Published Applications with XenDesktop 7.6
- Lab: Part 14 – Citrix StoreFront 3.x
- Lab: Part 15 – Configure SSL in StoreFront
- Lab: Part 16 – StoreFront load balancing with NetScaler (Internal)
- Lab: Part 17 – Optimize and secure StoreFront load balancing with NetScaler (Internal)
- Lab: Part 18 – Secure LDAP (LDAPS) load balancing with Citrix NetScaler 11
- Lab: Part 19 – Configure Active Directory authentication(LDAP) with Citrix NetScaler 11
- Lab: Part 20 – RDP Proxy with NetScaler Unified Gateway 11
- Lab: Part 21 – Secure SSH Authentication with NetScaler (public-private key pair)
- Lab: Part 22 – Ultimate StoreFront 3 customization guide
- Lab: Part 23 – Securing Citrix StoreFront DMZ deployment
- Lab: Part 25 – Upgrade to Citrix StoreFront 3.7
- Lab: Part 26 – Install/Upgrade Citrix XenDesktop 7.11
- Lab: Part 27 – Getting started with Microsoft Azure
- Lab: Part 28 – Getting started with Citrix Cloud
- Lab: Part 29 – Configure XenDesktop And XenApp Service with Microsoft Azure and Citrix Cloud
- Lab: Part 30 – Configure Identity and Access Management in Citrix Cloud with Microsoft Azure AD
- Lab: Part 31 – Configure NetScaler Gateway Service for XenApp and XenDesktop Service in Citrix Cloud
- Lab: Part 32 – Configure MCS with XenDesktop and XenApp Service in Citrix Cloud
- Lab: Part 33 – Configure Azure Quick Deploy with XenDesktop and XenApp Service in Citrix Cloud
- Lab: Part 34 – Configure Site Aggregation for Citrix Workspace in Citrix Cloud with XenDesktop 7.x located on-premises
- Lab: Part 35 – Configure a Hybrid NetScaler MA Service environment in Citrix Cloud
- Lab: Part 36 – Configure ShareFile in Citrix Cloud with StorageZones on-premises
- Lab: Part 37 – Upgrade NetScaler HA pair with NetScaler MA Service in Citrix Cloud
- Lab: Part 38 – How to Configure Full VPN Setup with Citrix NetScaler in CLI
- Lab: Part 39 – Configure Multi-Factor Authentication with Azure MFA Service and Citrix Workspace
- Lab: Part 40 – Getting Started with Citrix App Layering
- Lab: Part 41 – Configure Citrix App Layering
- Lab: Part 42 – OS Layer with Citrix App Layering
- Lab: Part 43 – Platform Layer with Citrix App Layering
- Lab: Part 44 – Application Layers with Citrix App Layering
- Lab: Part 45 – Layered Image Deployment with Citrix App Layering
- Lab: Part 46 – Elastic deployment with Citrix App Layering
- Lab: Part 47 – User Layers with Citrix App Layering
- Lab: Part 48 – Windows 10 and PVS with Citrix App Layering