Step-by-step guide to learn how to deliver Application Layers elastically with 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. In this post, we will deliver our first Application layer elastically and optimize that layer with best practices.
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
Requirements
For this lab, you need the following:
- Citrix ELM installed and configured
- OS Layer imported
- Platform Layer created
- Few Application Layers available
- Permissions to create AD groups
- .NET 4.5 must be installed in the OS Layer
- App Layering Network File Share must be configured and reachable from the virtual machines
Best Practices for Elastic deployment in Citrix App Layering
- Do not deliver the same App Layers in the image and elastically
- Elastic is a way to deploy applications that have been layered with the same OS Layer. Do not deploy App layers on different OS Layer elastically.
- It is not recommended to deploy Microsoft Office and Office 365 elastically.
- You can assign Elastic Application layers to users but also computers by adding the computer object in an AD group or by publishing the layers directly to the computer object.
- Elastic Application Layers assigned to users are mapped after the logon and can increase the duration of this step.
- Elastic deployment is not application virtualization. Applications are not isolated. Once mapped, the layers are visible by all users connected on the same machine.
- Enable Compatibility Mode if a layer delivered elastically is not loading properly during logon.
Deploy App layers elastically in Citrix App Layering
Elastic configuration in stored in the json files located in the layer repository:
- ElasticLayerAssignments.json -> This file contains the information about user and group mapping to individual application layers. This file will contain and entry for each group or user ID that has assigned applications.
- Layers.json -> This file defines the Layers in the repository and metadata about the layers used by the Citrix Elastic Layering Filter Driver.
- MachineAssociations.json -> This file defines machine associations – You can use a computer name pattern containing wildcards to associate a set of computers with any AD group.
- ShareAssignments.json -> This file contains the information about storage location assignments.
- Shares.json -> This file contains the information about storage locations.
Go to ELM console > Layers > App Layers and select a layer to be delivered elastically.
Right click and select Add Assignments.

Select the version of the layer to deliver elastically.

Go next without selecting a template.

Select the AD group you want to publish to layer elastically to.

Click on Assign Layer to confirm.

ELM will update the configuration files located in the repository.

ElasticLayerAssignments.json has been updated:
1 2 3 4 5 6 7 8 9 10 11 12 |
[ { "Sid": "S-1-5-21-3702114223-2806428234-104617735-1183", "Name": "CTX_ELM_WORKERS", "LayerAssignments": [ { "LayerId": 2162690, "RevisionNumber": 1 } ] } ] |
Let’s take a look at our layer configuration:

The layer ID (2162690) is the same as in the elastic layer configuration file.
Logon on a virtual machine running a Layered Image previously generated with Citrix App Layering. 2016_APP_BASELINE layer should be mapped after the logon.
3 log files are available on the virtual machine with App Layering (CTX222133):
- Windows Application Event log: In the Windows Event Viewer under Windows Logs, export the Application event log as an EVTX file.
- Unidesk Layering Service log (ulayersvc.log): C:\ProgramData\Unidesk\Logs\ulayersvc.log
- Unidesk LayerInfo log (layerinfo.log): %LOCALAPPDATA%\Unidesk\Logs\layerinfo.log (note, this is in the current user profile)
Elastic assignment logs are available in C:\ProgramData\Unidesk\Logs\ulayersvc.log.
Note: Logging is configured for INFO and above. To get verbose logging, edit C:\Program Files\Unidesk\Layering Services\ulayer.exe.config. Scroll down to find this block in the Log4Net Appender section:
<root>
<level value=”INFO”/>
<appender-ref ref=”LogFileAppender”/>
</root>
Change INFO to DEBUG and save.
Note: In this example, ULayer is configured for INFO logging.
Let’s take a look at the logs to understand how App layers are mapped elastically.
1 2 |
2018-12-26 19:14:03,309 INFO 6 ActiveDirectoryInfoService: Starting AD Machine group polling 2018-12-26 19:14:04,200 INFO 6 ActiveDirectoryInfoService: Machine Group SID(s): CITRIXGURU\Domain Computers, CITRIXGURU\CTX_ELM_WORKERS |
The App Layering Guest Service running on the virtual machine will first poll Active Directory to get the list of AD groups. It is this service that is responsible for enumerating and mounting elastic layers right before user logon during the “userinit” process.
In this example, only 2 AD groups have been found:
- CITRIXGURU\Domain Computers
- CITRIXGURU\CTX_ELM_WORKERS
This last group is related to Elastic deployment as configured previously in this article.
Next the service is parsing C:\Program Files\Unidesk\Etc\ImageInfo.json to get information about the OS Layer. This file is generated during the OS layer creation.
Here is the content of the file in this example:
1 |
{"OsLayerId":1507329,"OsLayerGuid":"085b7bc1-a529-4751-95d1-7ff5c1516620","OsLayerName":"OS_2016"} |
The App Layering Guest Service will read the content of the file to get the name of the OS Layer (OS_2016) and its layer ID (1507329).
1 2 3 |
2018-12-26 19:14:19,262 INFO 8 MachineIdentityService: ImageInfo path: C:\Program Files\Unidesk\Etc\ImageInfo.json 2018-12-26 19:14:19,262 INFO 8 MachineIdentityService: ImageInfo path: {"OsLayerId":1507329,"OsLayerGuid":"085b7bc1-a529-4751-95d1-7ff5c1516620","OsLayerName":"OS_2016"} 2018-12-26 19:14:19,278 INFO 8 MachineIdentityService: ImageInfo: 1507329, OS_2016 |
Then the service will prepare the attachment of the layer(s) assigned the machines or users.
1 2 3 4 5 6 |
2018-12-26 19:14:19,278 INFO 8 LayerConfigService: Attaching ElasticLayer: Name '2016_APP_BASELINE' : FileName 'Unidesk/Layers/App/P2162690.R1.vhd' ---------== Layering Results ==----------- User: CITRIXGURU\user1 (S-1-5-21-3702114223-2806428234-104617735-1145), Machine: VM01, ULayer: 18.12.0.16917 Assigned Layers: [Pending] Id: 0x0000000000210002, Revision: 1, Name: 2016_APP_BASELINE, File: Unidesk/Layers/App/P2162690.R1.vhd ------------------------------------------ |
The layer is currently pending.
The next step is to map the disk(s), compose/merge the registry, create Windows services (if required):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
2018-12-26 19:14:19,434 INFO 6 VirtualDiskService: Attaching virtual disk 'C:\Layers\Unidesk\Layers\App\P2162690.R1.vhd' 2018-12-26 19:14:19,434 INFO 8 CompositingManager: User CITRIXGURU\user1 logged in successfully. No elastic layers were attached. 2018-12-26 19:14:19,450 INFO 8 SessionDynamicLayeringService: Running on a session host thus the common drivers are already running 2018-12-26 19:14:19,450 INFO 8 SessionEventHandler: Finished processing logon event 2018-12-26 19:14:19,450 INFO 8 RequestService: Ending request 1 started on behalf of CITRIXGURU\user1 2018-12-26 19:14:21,356 INFO 6 NativeMethodInterceptor: Native method 'CreateFile' took '1.2297749' seconds to execute. 2018-12-26 19:14:21,372 INFO 6 LayerConfigService: Attached disk: Volume Label 'UDiskP210002V0R1' : Path '\\?\Volume{0002b06b-0000-0000-0000-100000000000}\\' 2018-12-26 19:14:22,200 INFO 9 RequestService: Starting request 2 on behalf of CITRIXGURU\user1 2018-12-26 19:14:22,200 INFO 9 HandlerHelper: Processing Query LogonStatusQuery->LogonStatusResult 2018-12-26 19:14:22,215 INFO 9 LogonInfoService: User CITRIXGURU\user1 is not a local user 2018-12-26 19:14:22,215 INFO 9 LogonInfoService: User CITRIXGURU\user1 (S-1-5-21-3702114223-2806428234-104617735-1145) is an elastic layer user 2018-12-26 19:14:22,215 INFO 9 CompositingManager: Completing compositing phase PostLogon for user CITRIXGURU\user1 (S-1-5-21-3702114223-2806428234-104617735-1145) 2018-12-26 19:14:22,215 INFO 9 CompositingManager: Waiting for 1 layers to be ready (2016_APP_BASELINE) 2018-12-26 19:14:22,215 INFO 9 CompositingManager: Configuring layers 2018-12-26 19:14:22,215 INFO 9 LayerConfigService: Elastic layer 2162690.R1, priority 1 2018-12-26 19:14:22,215 INFO 9 UnifltrConfigurationService: Configure application disk 1: UDiskP210002V0R1 2018-12-26 19:14:22,325 INFO 9 UnifltrConfigurationService: New volumeCount = 2 : rescans = 20 2018-12-26 19:14:22,340 INFO 9 LayerServiceFileReader: Reading layer service file '\\.\Volume{0002b06b-0000-0000-0000-100000000000}\Program Files\Unidesk\Etc\P210002.json' 2018-12-26 19:14:22,356 INFO 9 WindowsServiceManager: Creating service 'AdobeARMservice' 2018-12-26 19:14:22,356 INFO 9 LayerConfigService: Started 1 LayerStartTasks 2018-12-26 19:14:22,356 INFO 9 CompositingManager: Layering Phase PostLogon Complete |
In this step, you can found how long it took for the Guest Service to map the layer(s).
You will see the status of the assignment(s). Here our disk was assigned successfully.
1 2 3 4 5 |
---------== Layering Results ==----------- User: CITRIXGURU\user1 (S-1-5-21-3702114223-2806428234-104617735-1145), Machine: VM01, ULayer: 18.12.0.16917 Assigned Layers: [Success] Id: 0x0000000000210002, Revision: 1, Name: 2016_APP_BASELINE, File: Unidesk/Layers/App/P2162690.R1.vhd ------------------------------------------ |
Once the layer is mapped. The App Layering Guest Service will perform post-mapping actions such as starting service(s) included in the layer(s).
1 2 3 |
2018-12-26 19:14:22,356 INFO 11 WindowsServiceManager: Starting service 'AdobeARMservice' 2018-12-26 19:14:22,356 INFO 9 CompositingManager: User CITRIXGURU\user1 logged in and successfully attached layers: 2016_APP_BASELINE 2018-12-26 19:14:22,372 INFO 11 WindowsServiceControl: Starting 'AdobeARMservice' service, waiting for status |
Note: App layers deployed elastically are not isolated. The content of the layers will be visible for all users connected to the machine.
Troubleshooting Elastic Deployment in Citrix App Layering
Change the repository
You can change the Elastic Layer repository in the registry without reimaging (CTX222107).
1 2 3 4 |
HKLM\SOFTWARE\Unidesk\ULayer Value: RepositoryPath Type: REG_SZ Data: \\fs01.citrixguru.lab\Layers\Folder |
And also change the file used for the Elastic assignments:
1 2 3 4 |
HKLM\SOFTWARE\Unidesk\ULayer Value:AssignmentFile Type: REG_SZ Data: ElasticLayerAssignments.json |
Restart the Guest Service or reboot the virtual machine to apply the settings.
No elastic layer assignments were specified or the specified share does not exist
This occurs when the Citrix Layering Service does not have access to the repository.

https://support.citrix.com/article/CTX222163
To troubleshoot, you can browse to the share via Windows Explorer and try to mount the layer(s) manually.

Right click on the .vhd file and select Mount.

You may be unable to mount the disk with the following error message.

Take a look at this article to troubleshoot this issue.
Troubleshooting App layers priorities for elastic deployment
Download App LayerPriority Utility from Citrix here (mirror).
Go to the setup tab and enter the IP address or FQDN or the ELM appliance and the root password.

Click on Save to validate the communication.
Then go to the main tab and click on Get OS Layers.
By default, layers are assigned a priority based on when they were created. The default layer priority matches the layers id within the App Layering database. Ids always get larger as layers are created.

In the case of App Layers delivered elastically, you only have to think about their priorities because the Platform and OS Layers are already compiled in the image. Therefore those layers will be applied first and eventually superseded by the content of the App Layers.
To change the priority of a layer.

Select a layer and click on Change Priority Val. Then enter the new priority and click on Change in the Actions menu.

The new layer priority is applied. You can apply new priorities to all App layers.

Priorities are stored in the Layers.json file located in the repository.
Click on Update JSON Files in the Actions menu to save the new configuration.
That’s all for Elastic deployment of App 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