Step-by-step guide to learn how to work with Users Layers in Citrix App Layering.

More from the Lab!

 

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

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

User Layers - Layered Image Disk
User Layers – Layered Image Disk

Confirm to create the template.

User Layers - Confirm Template creation
User Layers – Confirm Template creation

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.

The second step is to look for existing disks.

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.

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:

Add version.

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

User Layer folder - first logon
User Layer folder – first logon

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.

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:

User Layer folder - After few logons
User Layer folder – After few logons

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:

User Layers - Machine is not ready before a reboot after a logoff
User Layers – Machine is not ready before a reboot after a logoff

You can configure that in PowerShell for a Delivery Group.

That’s all for User Layers. I hope it helped.

More from the Lab!