App Layering – App Layers, Image Templates, and Publishing

Last Modified: Sep 27, 2023 @ 7:22 pm

Navigation

Change Log

Create App Layer

Note: Citrix App Layering does not isolate applications. If you need isolation (e.g. multiple versions of Java), consider implementing Microsoft App-V. Citrix App Layering merges the layers without isolation.

  1. See Citrix CTX225952 4.x Layering Best Practices
  2. In the ELM Management Console, go to the Layers tab or node.
  3. In the App Layers tab, click the Create App Layer button. Or in the Silverlight interface, right-click in the grey, and click Create App Layer.

  4. In the Layer Details page, give the layer a name and version. Since the App Layer is tied to the OS Layer, it’s a good idea to include the OS Layer name in the App Layer name.
  5. Give the layer a Max Size. If Offload Compositing is not enabled then the layer disk created for the vSphere Packaging Machine is Thick Provisioned. Scroll down or click the down arrow.

  6. In the OS Layer section, select an OS Layer and version. An App Layer created for one OS Layer cannot be used with another OS Layer. Scroll down or click the down arrow.

  7. In the Prerequisite Layers section, you can select additional dependent App Layers to include in your packaging machine. If there are no dependent layers, just scroll down or click the down arrow.

  8. In Silverlight, in the Connector page, select a vSphere connector, and click the down arrow.
  9. In the Platform Layer section, if you are creating the App Layer on a different hypervisor than originally used for the OS Layer, you can select the Platform Layer for the new hypervisor. If the hypervisor has not changed, just scroll down or click the down arrow. The hypervisor can also be changed when publishing the Image Template later.

  10. In the HTML5 interface, select a Connector, enter a filename for the .vmdk file, and click Confirm and Complete.

    1. In the Silverlight interface, in the Packaging Disk page, give the .vmdk file a name, and click the down arrow.
    2. In the Icon Assignment page, select an icon, or upload a new one, and click the down arrow.
    3. In the Confirm and Complete page, click Create Layer.
  11. Go to the Tasks page. Or in Silverlight, at the bottom of the page, open the Tasks panel.
  12. Click View Details for the running task. Or in Silverlight, click the information icon next to the running task.

  13. Eventually the task will finish deploying the Packaging Machine and say Action Required.

  14. In vSphere Web Client, find the new Packaging Machine (in the PackagingVMs folder in the Layering VM folder), open its console, and install your app normally.
  15. See App layer recipes at Citrix Docs for some application install instructions.
  16. Citrix CTX226984 App Layering/Unidesk: The list of Windows Updates is usually wrong in app/platform layers and published images/desktops.
  17. Antivirus can be installed on an App layer. See Deploy anti-virus software at Citrix Docs for instructions for the following:
    • Symantec
    • McAfee
    • Trend Micro
    • Sophos
    • AVG
    • Kaspersky
  18. User settings are not captured in an Application Layer.
  19. Domain Join – CTX224668 How to install applications that require joining the domain with Citrix App Layering – In summary, you can join a layer to the domain while packaging, but you must remove it from that domain before finalization.
  20. For Office, put all Office apps in one layer.
    • Print to OneNote does not work in Elastic Layers.
  21. For Office 365 Click-to-run activation:
    1. After Office Click-to-run is installed, for all OSs other than Windows 7, run C:\Windows\Setup\scripts\Office2013Windows81_PREP.cmd as Administrator.
    2. In App Layering 4.6, Optimize.hta and Office Activate.cmd can handle Office 365 Click-to-run activation. For 4.5 and older, see Rob Zylowski at Office Activation Scripts for Office 365 at Citrix Discussions, to download these scripts . Also see O365 Office 2016 click to run online activation at Citrix Discussions.
    3. Go to C:\Windows\Setup\Scripts, right-click RunOptimizer.cmd, and click Run as administrator.
    4. Scroll down to J, check the box next to Process Office 365, and click Save Settings A-K.
    5. This creates a file called ProcessOffice365.txt.
    6. See Citrix CTX224566 Unidesk Recipe for Office 2016: Using Shared Computer Activation From Office 365 for more licensing guidance.
  22. For Office Volume License activation: (Source = Citrix CTX224900 Windows / Office 2016 KMS not activating in App Layering images (MCS Image Prep OS Rearm Failed)
    1. Go to C:\Windows\Setup\Scripts, right-click RunOptimizer.cmd, and click Run as administrator.
    2. Configure item H.
    3. Scroll down a little bit and click the button labelled Save Settings A-K. Then click the Optimizer.


    4. For all OSs other than Windows 7, run C:\Windows\Setup\scripts\Office2013Windows81_PREP.cmd as Administrator.
    5. Then rearm Office by running C:\Program Files\Microsoft Office\Office16\OSPPREAM.exe as administrator.
  23. When you are done installing your app, finalize the layer:
    1. George Spiers Citrix App Layering Preparation Script: runs a number of tasks to clean out temporary folders, clear out Event Log entries, remove ghost devices from Device Manager, etc.  ?
    2. Double-click the Shutdown for Finalize icon on the desktop. If it finds issues, it will tell you what to do (e.g. reboot needed). Otherwise, it will shut down the VM.
  24. If Offload Compositing is enabled in your Connector, then upload will happen automatically.
    1. Otherwise, after the machine is shutdown, in ELM Management Console, go to Layers > App Layers.
    2. Right-click the Layer that is currently being Edited, and click Finalize.
    3. In the Script Path page, if you embedded any scripts in the layer, specify the path. Otherwise, just click the down arrow.
    4. In the Confirm and Complete page, click Finalize.
  25. It will eventually finish and say Deployable.

  26. You can Edit Properties on your App Layer to change the icon or specify a Script Path.

Windows Updates – From Gunther Anderson: “Generally, the list of updates is unreliable anywhere except the layer where the updates were installed. If your OS layer says the updates were installed, then they were. The actual list (the list is not the same as the actual updates) tends to get stepped on by your other app layers, since they remember the updates list from when they were originally created. With all of your app layers trying to set their own personal misunderstanding based on when they were initially created, what winds up in the published image is not a good reflection of any reality. However, the information from the OS layer is correct. Likewise, the list of Office updates shown in the Office layer is correct even when the list of Windows updates shown in the Office layer is not.”

User Layer Repair – App Layering 1908 and newer create User Layer Repair files for any new or edited App Layer. Uses these files to repair User Layers so that the App Layer you just created or edited overrides the User Layer.

Citrix has a User Layer Management Utility that does more than just repair. It can also Reset (rename) user layers, Compress them, or Expand them. This tool also works with FSLogix disks.

To repair user layers without using a utility:

  1. Find the repair files in your file share under \Unidesk\Layers\App\Repair and \Unidesk\Layers\App\PackageAppRules.
  2. Copy the UserLayerRepair.json file for the App Layer to the user’s User Layer .vhd location.
  3. Make sure Domain Computers has Modify access to the user’s VHD location. The repair function runs as the computer, not the user.
  4. After logging into a published machine, C:\Programdata\Unidesk\Logs\ulayersvc.log shows the Repair status.

OS Layer Switching – if you enabled the OS Layer Switching Lab Feature, then do the following:

  1. Edit Properties on the App Layer.

  2. In the App Layer Settings section (Layer Details page) is a checkbox to Allow this App Layer to be elastically assigned to all Layered images, regardless of OS layer (Allow OS Layering Switching). You’ll need to repeat this for each additional App Layer. Source = Elastic layers to other OS layers not working as expected at Citrix Discussions.

Image/Template

  1. In the ELM Management Console, go to the Images node/tab, and click Create Template.
  2. In the Name and Description page, give the Template a Name that indicates the OS Layer, Platform Layer, and App Layers. Then scroll down or click the down arrow.
  3. In the OS Layer section, select an OS Layer, and scroll down or click the down arrow.
  4. In the App Layers section (Application Assignment page), click Edit Selection and select zero or more applications. Any App Layer you select here will be merged into the machine pre-boot. Elastic Layers are assigned later. Click the down arrow.

  5. In HTML5, in the Platform Layer section, select a Platform Layer and version. If you are pushing to PVS, then make sure the Platform Layer includes the PVS Target Device Software. Scroll down.
  6. In HTML5, in the Connector section, select an existing Connector. In the HTML5 interface, in App Layering 2202 or newer, use the Connectors page in the HTML5 interface to add a Provisioning Services connector. Or use the Internet Explorer Silverlight interface at System > Connectors. See below for some configuration info for this type of Connector.
  7. In the Layered Image Disk page, give the .vmdk file a name, specify a size, and decide if you want Sysprep to run or not. You typically don’t need to Sysprep the image if you’re using MCS, PVS, Composer, or Instant Clone.
  8. App Layering 2308 and newer have an option to Defragment Layered Image Disk.
  9. If you wish to enable Elastic Layering, select it here to enable it in the Image Template. Assignment of Elastic Layers to users is described later. Notes:

    • Disk Free Space – when you enable Elastic Layering, the published image only gets 20 GB of free space due to the addition of a writable partition. To change the size, see CTX225030 How to set the default size of the Elastic Layering writable volume. You edit /usr/local/CAMService/CAMService.exe.config and add the line <add key="ScratchVolumeSizeInMB" value="20480"/>
    • Login time delay – From Rob Zylowski at XenApp Image Template Application Assignment vs Elastic Delay at Citrix Discussions: “There is a 5-8 second penalty just for turning on elastic layering. But its not a straight x seconds per app because the mounts run in parallel. However more apps do take longer. What can have more of an effect is if the app has a service. We have to mount the disk, read it and then start the service before we allow the logon to ensure that the service is available if your logon actually needs it. There is a log at c:\programdata\unidesk\logs that will tell you the time associated with mounting and starting elastic layers so you will know how much of the logon impact is due to elastic layering.”
    • Elastic Layers Path Override – The path to Elastic Layers can be overridden by setting HKEY_LOCAL_MACHINE\SOFTWARE\Unidesk\ULayer:RepositoryPath on the published machine. See CTX222107 You can change the Elastic Layer repository in the registry without reimaging (4.x).
    • Citrix Profile Streaming Compatibility – App Layering 4.12 and newer support Citrix Profile Management Profile Streaming with Elastic Layers. Also see Elastic Layers and Profile issues at Citrix Discussions.
    • Delayed loading – By default, Elastically Assigned Layers are loaded at the end of the login process so that the user can get to a desktop quickly and not have to wait for their Elastic Layers to surface first. However, especially with Session Hosts, you may find that the Elastic Layers are not available quickly enough. It is possible to make Elastically Assigned Layers attach at the beginning of the login process. by setting HKLM\SOFTWARE\Unidesk\ULayer\MaxCompositingPhase = 0. More info at CTX246468 How to disable delayed loading of Elastic Layers on an image.
  10. User Layers is another option. Notes:

    1. User Layers have the same application compatibility limitations as Elastic Layers.
    2. Storage Locations for User Layers are configured at System > Storage Locations.
      • In App Layering 2005 and newer, you can set a custom path by creating a REG_SZ value called CustomUserLayerPath in the HKLM\Software\Unidesk\Ulayer key. See How to specify a custom user layer path at Citrix Docs.
    3. The default size for User Layers is 10 GB. You can change this size by setting HKLM\Software\Unidesk\Ulayer\DefaultUserLayerSizeInGb on the managed machines. Source = Understanding Elastic Layering > Scaling (tab) > User Layer Size.
    4. Multiple access to the User Layer VHD is not allowed.
    5. After logging into a published, layered machine and mounting a user layer, you must revert the machine. Non-persistent Catalogs automatically revert the machine after logoff. Or take a snapshot before logging in and revert to snapshot after logging out.
    6. David Wilkinson describes User Layers in detail at Citrix Application Layering – User layers.
  11. Office 365 User Layers is a fully supported feature. For details (including limitations), see:

  12. Session Office 365 User Layers can roam Outlook OST files on RDSH VDAs.

  13. Scroll down or click the down arrow and then click the Confirm and Complete button or Create Template button.
  14. The Image is then displayed as Publishable.

Clone Template

There’s a Clone Template feature to more easily create multiple templates with similar configurations.

  1. On the Images tab, select an existing Image Template and click the Clone button.
  2. Right-click the newly created template and click Edit.
  3. Notice the name has – Copy on the end. Feel free to change the name and edit the new template as desired.

Publish Image

  1. Select a publishable image template and click Publish Layered Image.
  2. In the Confirm and Complete page, click Publish Layered Image.
  3. Open the Tasks pane and click View Details (the information icon) to view details of the running task.
  4. If publishing to MCS (vSphere):
    1. In the vSphere Web Client, you’ll find the Template VM under the TemplateVMs folder under the Virtual Machine folder you selected for the Connector.
    2. Citrix MCS creates VMs in the same Folder as the Master Image. You might want to move the Template VM to a different virtual machine folder.
    3. For MCS, in Citrix Studio, create a Machine Catalog using the Template VM as the Master Image.

    4. Notice that MCS creates VMs in the same Virtual Machine folder as the Master Image.
  5. If publishing to Provisioning Services (PVS):
    1. The image is uploaded to the vDisk Store as a .VHD file (not .VHDX).
    2. And it’s automatically added to the vDisk Store in the PVS Console. You can now assign it to your Target Devices.
    3. You can Redirect ulayersvc.log to another folder or drive by modifying C:\Program Files\Unidesk\Layering Services\ULayer.exe.config. You can only modify this file after the image is published. (Source =CTX237138 Redirect ulayersvc.log to another folder or drive)
    4. CTX226065 Citrix App Layering 4.x: PVS Image Management – choose an image, then list all the targets using that image optionally filtering on one ore more collections, then “promote” the image to all selected targets.
    5. If the PVS Image prompts for a reboot, then see CTX230767 App Layering: Published image to PVS prompts user to restart computer. Create a new Platform Layer version. Take an existing Write Cache disk and attach to the Packaging VM so it can detect the new hardware. Remove the second disk and Finalize the Layer.

Elastic Layers

Logon delay – From Rob Zylowski at XenApp Image Template Application Assignment vs Elastic Delay at Citrix Discussions: “There is a 5-8 second penalty just for turning on elastic layering. But its not a straight x seconds per app because the mounts run in parallel. However more apps do take longer. What can have more of an effect is if the app has a service. We have to mount the disk, read it and then start the service before we allow the logon to ensure that the service is available if your logon actually needs it. There is a log at c:\programdata\unidesk\logs that will tell you the time associated with mounting and starting elastic layers so you will know how much of the logon impact is due to elastic layering.”

Citrix.com Understanding Elastic Layering – A technical overview of the Citrix App Layering 4.x Elastic Layering Architecture and Configuration details

Provisioning Cache Disks – Citrix CTX227454 App Layering: PVS Cache Disks May Need to Be Larger with Elastic Layering: you may need to add capacity to your Cache Disks and/or Cache Memory reservation on your Target Machines to support App Layering with Elastic Layers. App Layering caches entire modified files, not individual modified blocks.

Profile Streaming Compatibility – App Layering 4.12 adds support for Citrix Profile Management Profile Streaming with Elastic Layers. Also see Elastic Layers and Profile issues at Citrix Discussions.

Delayed loading – By default, Elastically Assigned Layers are loaded at the end of the login process so that the user can get to a desktop quickly and not have to wait for their Elastic Layers to surface first. However, especially with Session Hosts, you may find that the Elastic Layers are not available quickly enough. It is possible to make Elastically Assigned Layers attach at the beginning of the login process. by setting HKLM\SOFTWARE\Unidesk\ULayer\MaxCompositingPhase = 0. More info at CTX246468 How to disable delayed loading of Elastic Layers on an image. 💡

To assign elastic layers to users:

  1. In HTML5, select an App Layer and switch to the Version Information tab. Select a version and click Update Assignments.

    1. In Silverlight, go to Layers > App Layers. Right-click a Deployable App Layer, and click Add Assignments.
    2. In the Select Version page, select an App Layer version, and click the down arrow.
    3. In the Image Template Assignment page, don’t select anything. This page lets you assign this App Layer to a Image Template for pre-boot merging. For Elastic merging/mounting, just click the down arrow.
    4. In the Elastic Assignment page, note any issues that Elastic Fit discovered that would prevent the app from merging elastically correctly. If you’re OK with the issues, click the Assign Elastically button.
  2. In HTML5, switch to the Elastic Assignments tab and click Assign to new users.
  3. Search for a user group you want to assign this Layer to, and check the box next to the group. Click Save when done. Or click the down arrow when done.

  4. Click Confirm and Complete. Or in Silverlight’s Confirm and Complete page, click Assign Layer.

  5. Open the Tasks pane to see the progress while it copies the App Layer to the remote SMB share.

  6. When it’s done, go to the SMB share to see the files it uploaded, including the .json files that contain Layer assignments.
  7. To enable Elastic Layers in machines created from a ELM Image Template, edit the Template (Images), and make sure Elastic Layers is enabled in the Layered Image Disk page.

  8. Note: when you enable Elastic Layering, the published image only gets 20 GB of free space due to the addition of a writable partition. HTML5 lets you edit the size of this writable partition.

  9. If you find that App Layers are conflicting with each other, you can adjust the App Layer priority by using the Unidesk 4 Layer Priority Utility — Experimental tool.
  10. From Citrix Discussions Application from an Elastic Layer as “Published App”? You can publish an elastic app. Simply publish an app, but manually specify the path to where executable would be. The app is mounted before the user logs in, so it will be there when Citrix tries to launch the app.
  11. The path to Elastic Layers can be overridden by setting HKEY_LOCAL_MACHINE\SOFTWARE\Unidesk\ULayer:RepositoryPath on the published machine. See CTX222107 You can change the Elastic Layer repository in the registry without reimaging (4.x).
  12. To debug Elastic Layers, see CTX222133 Elastic Layering Logs. Only Info logging is enabled by default.
    1. In C:\Program Files\Unidesk\Layering Services\ulayer.exe.config, set LogFileAppender level to Debug
      1. Must be set before machine boots.
    2. C:\ProgramData\Unidesk\Logs\ulayersvc.log

Update Layers

  1. You can optionally select an existing App Layer and click Clone. You would do this if want to create a new branch of app updates without affecting the main branch.

    1. You can select a particular version of the source layer.

    2. It takes a bit of time to clone the layer. Use the Task status panel to see when it’s done.

  2. In the HTML5 interface, select an App Layer, switch to the Version Information page, and then click Add Version. In Silverlight, right-click an App Layer and click Add Version.

  3. In the Version Details page, enter a new version, and scroll down or click the down arrow.

  4. In the OS Layer page, click the down arrow.
  5. In the Prerequisites Layers page, click the down arrow.
  6. In the Connector page, select a Connector, and click Confirm and Complete, or click the down arrow.

  7. In the Platform Layer page, click the down arrow.
  8. In the Packaging Disk page, click the down arrow.
  9. In the Confirm and Complete page, click Add Version.
  10. The task details shows the current progress.
  11. It eventually says Action Required.
  12. When the Packaging Machine is deployed, you can connect to its console and perform any desired updates. When you are done performing updates, finalize the layer:
    1. George Spiers Citrix App Layering Preparation Script: runs a number of tasks to clean out temporary folders, clear out Event Log entries, remove ghost devices from Device Manager, etc.  ?
    2. Double-click the Shutdown for Finalize icon on the desktop. If it finds issues, it will tell you what to do (e.g. reboot needed). Otherwise, it will shut down the VM.
  13. If Offload Compositing is enabled, then upload happens automatically.
    1. Otherwise, when done updating the Packaging Machine, right-click the App Layer that is marked as Editing, and click Finalize.
    2. In the Script Path page, click the down arrow.
    3. In the Confirm and Complete page, click Finalize.
  14. View the task details to see the current progress.

  15. To confirm that you have a new version, in HTML5 interface, select the App Layering and switch to the Version Information tab. In Silverlight, right-click the App Layer, and click Delete Versions.

  16. You can only delete versions that are not assigned to any Image.

  17. There are two methods of assigning a new version: one image at a time, or multiple images.
  18. To edit one image:
    1. Go to the Images tab. Select an Image, and click Edit Template.

    2. In HTML5 interface, scroll down to the App Layers section and click Edit Selection. Select the new version and click Save. Then click Confirm and Complete.

      1. In Silverlight, click the Application Assignment page. Click the plus arrow next to a Layer and select the new version. Then complete the wizard.
  19. To update multiple images:
    1. In HTML5, in the Version Information tab for a Layer, select the version and click Update Assignments.

      1. In Silverlight, right-click the updated layer, and click Update Assignments.
      2. In the Select Version page, select the version you want to assign, and click the down arrow.
    2. In the Image Template Assignment tab, select the templates you want to update, and scroll down or click the down arrow.

    3. In the Elastic Assignment tab, if this App Layer is assigned to users, you can update them too. Click the down arrow.

    4. Click Confirm and Complete, or in the Confirm and Complete page, click Update Assignments.

  20. Once an image has a new version assigned, you must republish it.

Export Layers

App Layering 4.3 and newer let you export all layers and versions to the SMB File Share.

  1. Go to the Layers tab.
  2. Right-click on the background, and click Export.
  3. App Layering 4.4 and newer lets you specify a file share for the exported layers.
  4. ELM 4.5 and newer let you select the layers and versions that you want to export. Make your selections, and then click the down arrow.
  5. Review the list of layers/versions it will export, and click Export.
  6. If you look in your SMB share, in the \Unidesk\Exported Layers folder, you’ll see a folder for the OS Layer, and in there, you’ll see a folder for each Platform and Application Layer.
  7. After creating new layer versions, if you export layers again, it will only export the layers/versions that haven’t already been exported.
  8. If you right-click the background, and click Import
  9. It only imports the layers/versions that are missing.

127 thoughts on “App Layering – App Layers, Image Templates, and Publishing”

  1. I just wanted to thank you Carl for creating this site and putting in the effort it takes to update and maintain. Citrix engineers refer to this site constantly and know you by name. Pretty cool!

  2. We installing Applayer on Nutanix AHV, a new installation.The only thing that is not working is when I create an Apps Layer, when I add a new apps layer, it failed with that error “A function was called with an invalid parameter”. The VM is not created. OS Layer, platform layer and Images Layer are working fine. Nutanix AHV 202001105.2244 / AOS 5.20.3, OS Layer on Windows 10 21H2.

  3. Hi Carl,

    Just wondering if you have anything written up for what to do after an ESXI host is updated? We recently updated from 6.7 to 7.01 and now the VM hardware is showing it is out of date. How do you fix this?

  4. Carl – we have been using layering and love it, but have recently realized that out Windows Server 2016 Component Store gets corrupt upon creating an image. Have tried recreating various times and it is always corrupt. Is this something you have seen? or has anyone else seen this? Bigger issue is that running all of the DISM repair options are NOT repairing the store.

  5. Hi Carl,
    thanks for your great article. Is there any possibility to dublicate a Plattform Layer? There’s no GUI option to clone like App Layers. Import an existing Layer doesn’t work also.

    Regards

  6. Hello Carl, Thank you for writing so many and most useful reference guides.
    I had a question if you may help. I have tried to look it up on citrix and other blogs, but have not found much reference. Is there a limit of how many applications i can throw in in one layer? Would it affect performance? Is there a comprehensive list of applications which i can and cannot layer. App Layering Recipes articles have very very limited applications listed.

    1. If not elastic, then I suspect # of apps in layer doesn’t matter. If elastic, then more apps probably means more time to integrate the elastic layer at logon.

      1. Thank you. I was planning on doing Elastic layer, but if i choose to do one application per layer then it will be many layers and that will also take longer. I have a use case where the user has almost 15-20 applications apart from some core and office applications. office and core layers are already on another layer. Any other way i can work this out?

  7. Hi. I’m trying to expose hardware assisted virtualization to the guest os in vmware. I enabled it to the os layer vm but that didn’t work because when I created a new application layer the setting was disabled. I also tried enabling it in the published image template but after updating the machine catalog all the created vms had the setting disabled. How can I configure the setting so that it stays enabled?

  8. Hello, Can Citrix App Layering be used to create and update virtual machines without having MCS or PVS? We currently use Unidesk and are trying to setup Citrix App Layering. We have VMware vSphere 6.7, VMware Horizon 7 and VMware Horizon 7 Composer. Thank you

  9. If you are using Office 365 on an RDS image you must add the following line in your Office 365 ODK configuration.xml file:

    If NOT you will get an error that it is not licensed properly for terminal server.

  10. I am using trial version of windows server 2012. I am using MCS to provision the machines from applayer template but found that 2012 trial version is showing expired. I have validated the OS layer and Platform layer i don’t see any issue with license. Any suggestion’s.

  11. Getting a black screen in win10-1809 User layer published images, Initial logon is fine, vhd is creating in the share, but if I log out and logon for 2nd time I’m getting the black screen.

  12. Hi Carl. Thanks for the guide. Is there a way to bulk upload multiple application icons? i.e. Is there just a folder on the appliance that they exist in?

  13. Hey Carl,

    Question in regards to using VHDX in PVS with app layering as your version er. Looking through the docs and the comments I cant see any clear benefit to doing it… Is there any reason performance or other wise that doing the conversion to vhdx is anything but a waste of time?

  14. Hi Carl,

    Office 2016 and 2013 Configuring each time run if I enable Elastic Layer in the published template.

    and App Layer – PVS published templates (.vhd) taking more than 2 min for users to login, MCS ones are less than 30 sec even with Elastic layer.

    Thanks,
    Venkat

  15. Hi Carl! Great article!!! Quick question – If I wanted to open an App layer just to look as what’s going on inside (no changes!) would I still need to create a new version? How do you just open an existing App layer?

  16. When creating a new MCS Catalog, App Layer created VDA machine in v Sphere is not available in studio for selection.

      1. Thanks for your response Carl!!
        yes, they are in the same Resource Pool in vSphere, and what I noticed is that master image is now showing in the studio, but it took 3 days to reflect in Studio.
        This issue is still persistent, I deployed Win10 1809 & 1709 yesterday using App Layering those 2 templates also not showing in the studio now. I removed XdConfig custom attribute and even rebooted DDC like last time, but no luck. Maybe I need to give a few more days for this also:). I am not sure what is happening in the back-end.

        1. If you had to remove the attribute, then restarting the Delivery Controller might force a refresh.

          Why does your image have the attribute?

  17. Hi Carl,

    I have been having this issue for a few weeks now. Office 365 always ask to login when i launch my MCS VDIs. When i launch outlook it s keeps loading profile at adding username@emaildomain.com.

    This suddenly started no change made. I have also installed office professional pro plus 2016 and that works fine. Reinstalled 365 based on CTX224566. Still same issue. when i launch other office apps, it requests login.

    Do you know what might be causing this?

    Thanks

    1. Hi Carl
      Hoping you can help with a performance query please.
      We are using NetApp HCI (all SSD) and have configured 10GB on hosts for management network. We use the VCenter appliance.

      PVS servers are all on same HCI cluster and all other VM performance with HCI has been exceptional.

      Creating layers and publishing to PVS is still very slow despite 10GB network. We suspect it’s network related, but not sure if it’s still possibly using 1GB rather than the 10GB.

      Do you have any guidance on how to verify as its getting to stage that it’s too slow to continue using as any new layers and publishing images just takes too much time.

      Many Thanks

      1. When Layering publishes to vSphere, it converts VHD to VHDX, which takes time. Is caching enabled in your Layering Connector? Newer versions of Layering highlight the benefits of connector caching.

    2. I know this is old thread, but did you ever get a resolution for that outlook 365 ‘loading profile’ issue.. I’ve started having customers complain about this within the past few weeks, and your issue sounds hauntingly familiar. We use citrix user profile management. If I turn of UPM and copy the profile down locally, Outlook loads fine. With UPM turned on the problem comes back. The issue seems to be a combo of something that happened to the user’s reg hive nituser.dat and when the profile/hive is loaded with UPM for the user. If I swap out the ntuser.dat or reset the profile, the issue goes away. I sort of wonder if active writeback registry might be at play.. But my hope is that whatever you found as a solution might help me as well. Maybe the info I’m looking for is further down this thread, but I welcome any reply.

  18. Hi Carl,

    Is there a reason you use the vsphere connector for publishing a MCS template and not the Citrix MCS for vSphere connector?

      1. 🙂
        I thought that maybe the packaging cache size option in the vSphere connector configuration has advantages for speeding up the publishing proces. But after testing this did not gave an advantage for publishing an image.

  19. Hi Carl,
    What are the capabilities or restriction with App Layers, if the application install destination need to go to a second partition istead of the OS drive?

    1. Is this an actual application requirement and it won’t work if installed on C:? Or are you just installing apps to D: because that’s how you build servers?

      1. I’m in the process of migrating from a 6.5 infrastructure and the organisation have done the install that way.
        When the Applications team was queried, they have advised that they want to keep it the same.

      2. Hi Carl,
        Any suggestions, I’ve tried creating a new base with an added HDD but the layer failed to finalize due the added HDD. 🙁
        Thanks in advance

  20. Great article, running small POC for app layering, when creating new layer for app, platform, os or publishing template, it takes incredible amount of time to finish. talking hour for creating application layer, is that something expected?

    1. What is your hypervisor?

      Did you enable caching in your hypervisor connection? If so, the caching should benefit you when creating App Layers.

  21. Hello Carl Thanks for such good docs. Have one query , What layer you suggest best for run the windows patches. Security and other patches like MS-office based. As of now I am confused whether to update app layer for MS-office patches (as of now getting issue on app layer when trying to update ms-office patch).

  22. Carl, having the ability to recreate your gold images from scratch is something I think is of importance…. OS, agents, apps et al…. other than App Layering, what other strategies have you seen or employed to achieve this?

  23. Hi Carl: After initially being excited about App Layering, our Team dove into the heavy work of making Layers out of some of our enterprise Apps… That’s when the difficulties arose: We found that HKCU settings — which many of our Apps require — can be configured in a Layer but will not “stick” when a Template is created, copied to PVS, and booted from… And having to import ADMX templates, and create GPOs for dozens of Apps that require HKCU settings, is laborious at best… Plus, it takes way more Time to test Versions of Layers than it does to just create a new PVS Version and test it on the fly… Have you found these same things to be true, in your experience? Thanks very much!

    1. How many image templates do you have? If you needed to depoy a Windows patch (OS Layer update) to all of your pools, how long would that take?

      1. Carl. Ok, so you only have to update a single OS layer for patching, but you still need to republish all your images that use it again, in their entirety, and reconfigure your PVS / MCS image allocations. I am currently myself thinking that the complexities of App Layering are bigger than the problems it solves

          1. Carl, what’s your honest opinion on App Layering as it is today?… Do you think it’s more trouble than it’s worth or are you a keen advocate?… and why?

          2. It’s safer to let customers form their own opinion. 🙂

            But I usually don’t offer it in my designs. I tend to promote Persistent Virtual Desktops over any non-persistent solution.

          3. “But I usually don’t offer it in my designs. I tend to promote Persistent Virtual Desktops over any non-persistent solution”

            Fair enough. What about for XenApp workloads?

          4. I always discuss how long it would take to deploy a security patch to multiple images, and if the duration is acceptable or not. Update OS Layer is around an hour. Publish each Template and update Catalog is probably another hour each Image. And no automation.

      2. We only have about 4 Image Templates created, at the moment… You’re right, one of the huge advantages to App Layering is the ability to deploy Updates quickly… But the disadvantages of HKCU settings not being “portable” is a big problem for us. We thought of WEM to help out with that, but we’re using Mandatory Profiles, so WEM doesn’t have a whole lot to add, in our situation…

        1. I currently have 14 golden images in my environment and use an SCCM Task Sequence to apply any security and application updates. It takes about 2-3 hours total. The slow part is updating the catalogs and restarting and verifying all the servers (I find the new image does not always get applied on the restart). I’m just finishing my POC of App Layering. Every time I add a new version it takes up to 90 minutes, then I have to struggle with having no active directory, no access to the internet, no SCCM so no way to pick and choose the security updates I want to apply. It then takes another 20 minutes to finalize. Then you have to do the same in all the other layers that need updating. Finally, publishing the image takes another hour. And I’ve only got an OS Layer, Platform Layer and two App Layers for the POC but we have hundreds of apps. I was pretty excited about app layering but sadly I cannot see where there is any time saved. One little update can take hours. I feel like I’m missing something… p.s. Thank you Carl for your excellent instructions. It was very easy to setup. It’s just too slow in our environment (vSphere 5.5)

          1. I really liked Unidesk 2.x. It was great for XD/Horizon View as it allowed you to define individual 1:1 desktops with a composition of layers. The creation/update process was short as it stored in vsphere format and published in vsphere format. It wasn’t single instance management of the image but was with the layers and it worked. Then 4.x introduced the provisioning publishing which added another step in addition to the storage/conversion overhead for vsphere (apparently reduced if using XenServer). I wish they would have allowed for 2.x style provisioning in 4.x to at least allow that functionality to be used for users. And 2.x had a user layer that was production.

          2. 2.x was legit except that cache point appliance nonsense. If you ever needed to move those + user layers to new storage? Holy Hannah, that sucks.

          3. Hey, did you ever figured out if you are missing something? Doing same type of POC finding the product to be less helpful then originally anticipated. Every operation takes ages, hour before you are even able to get to the actual update and since you separate by application for most part, it is time consuming process. Was also thinking that this cannot be it, does not feel like improvement to automated update process when using PVS/MCS

          4. Sorry Mike I didn’t. It was rubbish and would have added days to an already arduous patch routine. We have just upgraded our hypervisor to VMWare 6.5 so I might try again once I have some time. I wonder if those that have had success are all using Citrix for their hypervisor?

  24. Thanks Carl,

    During Template creation, PVS authentication I am getting error “Failed to connect to the Citrix App Layering Agent on xxxxx”

    What I have done so far:
    Uninstall reboot and reinstall PVS Agent
    Enable-PSRemoting
    Ensure that port 8016 is open
    register /i /e:IP_address_of_ELM /u:Administratorname
    load dlls c:\program files\citrix\provisioning services console
    “C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe” Citrix.PVS.snapin.dll (for XD 7.15)
    “get-pssnappin -registered”
    Removed all firewalls
    Enable bits
    Account is in PVS administrators group in the farm properties.

  25. Very detailed doc Carl, thanks.
    It’s still all hazy and confusing despite a lot of info and Q&A.
    I already have a VDI environment built out of MCS and PVS, I want to gradually replace my PVDs with this, without having an OS layer how can I simply connect the apps in the app layers to my existing environment?

    1. Citrix App Layering ties App Layers to OS Layers. Other vendors (e.g Liquidware, VMware App Volumes) don’t have that restriction.

      1. Thanks Carl,
        I understand you need an OS (like Win10 or 2012) as an “installation machine” only and once app layers are created you can simply elastically assign those to VDI’s created out of other technologies like PVS and MCS. I don’t want to use app layering to create my OS images just the apps. If I am correct do I then only need the agent on the VDIs to enumerate the apps?

  26. I am testing AppLayering with using “PVS Connector Script to Convert VHD to VHDX “.
    The Image creation works fine but the disk is not being converted. I do not have any log file to indicate what could have gone wrong.

    Is there any other location to check why the script was not launched?

  27. I am testing AppLayering with PVS, and using “PVS Connector Script to Convert VHD to VHDX “.
    But I observed that the disk was not converted and no log to indicate the cause. There was even no error message during publish of the Image.

    Is there any other place I could check why the script was not even launched?

    1. Did you follow the Citrix article on how to deploy the script including the suggested application (qemu), modified the script to include correct path and in ELM the connector script? fun huh :]

  28. Hello Carl,
    I’m testing AppLayering on my lab.
    It’s working perfectly using MCS, but when i use PVS the image was correctly added as vhd to vdisk image, but when i associate a server wit that image the server hang showing only windows startup flag. Can you help me?
    The only step that I skip was
    CTX226065 Citrix App Layering 4.x: PVS Image Management – choose an image, then list all the targets using that image optionally filtering on one ore more collections, then “promote” the image to all selected targets.

    The tools return a script error getting collections and targets.

  29. Hi,

    Do elastic layers have to be applied to a “Layering Image”? Can I install the layering service on our non-persistent VPC image and have the layers applied there?

    Citrix docs state: “Any machine running the App Layering Service (ULayer.exe) can have Elastic Layers assigned to it.”

    Where do I get the install that sets up the App Layering Service?

    Thanks

    1. I think it only layered image is supported. And the Elastic Layers must be based on the OS Layer of the layered image. There’s a Tech Preview feature that the Elastic Layers don’t have to match the OS Layer.

      The service is either installed with the App Layering Machine Tools, or layered in when the image is published from ELM.

  30. Hi Carl,

    I’m having some trouble understanding elastic layers. Can an elastic layer be assigned regardless of the underlying layered image? For example if I have an elastic layer for Aodbe Reader and two different Layered images – one is Windows 7 and the other is Windows 10 – and assign the layer to an AD Users group… will the layer apply regardless of which image the user is accessing? So far I’ve been unable to get this behaviour from an elastic layer which seems strange given that the whole premise of App Layering is to reduce overhead. My elastic layer will work with one image but not the other, even though it’s only assigned to one user group and not any templates.

    Thanks,

      1. Hi Carl,

        I didn’t see your reply until now. I’ve enabled both the features available in “labs” – OS User Layer (Full) and OS Layer Switching – but neither of these seem to do the trick? I’m using App Layering 4.8.

        Thanks,

  31. Carl. Why is it that we cannot assign elastic layers to computers instead of users? Seems like a good idea to me. And it seems a shame elastic layers cannot be automatically cached to computers on boot-up to prevent the first user “losing out” on experience as it’s downloaded. Thoughts?
    Plus I want native VHD
    Plus I want PVS versioning integration

    I don’t want much do I?

    1. You can create a global group that contain computers accounts and assign the layer to that group. It will still attach on user login so you wont get any precaching but it does work,

  32. Hi Carl.
    Hoping you can help with a challenge around SCCM and Microsoft Endpoint.

    I found a recipe for SCCM (https://support.citrix.com/article/CTX226394?download) which seems fine so we can deploy that in an app layer. How do we ensure that Microsoft endpoint definition updates apply to PVS target thought? Is this not compatible as we cannot put endpoint in an application layer as it is integrated into Windows 2016 OS.

    Also, the OS layer guide recommends disabling Windows update which Endpoint client requires.

    I assume these endpoint definition updates need to apply to the OS disk which is read only so how do we ensure that PVS target can successfully update when Endpoint definition updates become available throughout the day.

    Thanks

    1. Layering recommends a GPO to disable Automatic Updates, but the service is not disabled. I assume a SCCM configuration can still deliver definition updates to the SCCM client.

  33. Hi Carl,

    would you please consider to go more into detail when it comes to publish images to PvS?
    I’m missing there statements about when and where to set up the cache disk configuration.
    For example:
    In order to get PvS caching working properly I need configure the cache disk settings properly within the Layers.
    I assume I need to create at some time an additional disk and at some point I need to configure the required settings for caching, WEM cache settings, Event Log redirection and so on.
    I think this all should be done while setting up the App Layer, correct?
    Also I assume that right after finalizing the App Lauer and shutting down the VM but before uploading it to the CLM appliance I have to remove the cache disk from the VM, correct?

    It’s quite important to get a good guidance to properly combine the different Citrix components, especially when it comes to get CLM, WEM and PVS or MCS properly working all together.
    Just for example some of the questions there that should be answered are:
    Where should I do the promotion of the published images: By using CLM or PvS console? What are the Best Practices there?
    Should I consider to convert the uploaded images from VHD to VHDX and in which cases this doesn’t make sense?

    1. https://support.citrix.com/article/CTX226095 shows how to add a drive to the Packaging Machine. Note, PvS will move the pagefile automatically so you don’t have to worry about that specific component. Other components (e.g. UPM Logs) can be moved by simply pushing down a group policy. The WEM Cache makes sense on D: drive, but WEM is installed in the Platform Layer.

      App Layering pushes the image/template to PvS and adds the vDisk to the Provisioning Services console. You then assign it to Target Devices.

      VHDX is beneficial (fast merges) for PvS versioning, which isn’t needed with App Layering, since each Publish is a new vDisk. Ideally, Citrix should add native VHDX to App Layering, but it isn’t there today.

  34. Hey Carl when using Citrix App Layering and publishing an image we are noticing the image is joined to the domain. We look in the logs of the Norskale agent and it showing trust issues with the domain. I am not sure if one of the layers was not removed from the domain before finalizing. Should the image be joined to the domain before publishing to MCS?

      1. Well yes the platform layer is joined to the domain but when we create that image from all the layers should that image still be joined to the domain?

        1. Maybe not correctly. It’s the domain join registry keys that are important. MCS and PvS should change the machine identity.

  35. Hello, we have used elastic layers but noticed that with only a few elastics mounted the login time become longer. The process of mounted VHD is very fast but it looks the service “User profile service” takes much more time to process when there is about 10 or more elastics layers. Consequently, the whole login process time can takes up to 2 minutes with EL enabled. If we do not use it or if there is only a few elastic assignments then login times takes between 10 and 40 seconds. This was tested with XenApp 7.14 and 7.15LTSR and Windows 2016 as VDA.

  36. Hi carl

    Do you know it is possible to use windows 10 build 1607 and applayering 4.3 also with pvs and pvd? I publish a win10 image over elm and use than pvs xendesktop wizard with static desktop. But that wont work. The pvd disk is empty. Is applayering with pvd disk Supported?

    Regards frank

  37. Hi,

    I have created an Image, which includes an OS-Layer with Windows Server 2016 and Citrix PVS as Connector. So when I start the VM, everything is ok, but when I select “Elastic layering only for application layers” at the image, the VM stucks at booting. I´ve attached an screenshot in here:

    https://discussions.citrix.com/topic/388391-vm-does-not-boot-from-image-when-elastic-layering-for-application-layers-was-selected/#entry1976122

    Can you figure out why it does not function?

  38. Citrix says that elestic layers on XenApp (terminal) servers are nw possible and even with retaining user data according to the lates “hot-adduser-assigned-app-layers-for-xenapp” post
    As far as I know, this has only been possible for Win7 guest OS, but not for Server 2016 based XenApp servers.
    Hast this really changed and does the current 4.2 really already support this or is this a little premature and only something they will provide in future?
    In case it really should be possible with 4.2, Carl, do you have some instructions on how to use this on Terminal Serversand most of all how retaining the user data is working and how it is merged into the user proifiledata?
    Thank you!

    1. User Layers for RDSH are on the roadmap, but I suspect it will be a while before it’s released. They need to get it working on Virtual Desktops first. 🙂

        1. Maybe you’re thinking of general application settings stored in a user profile? That definitely works. Just implement UPM like normal.

          1. No, not in the user profile, because, yes, then UPM would cover this, but I’m thinking about the settings within the program and maybe for example changes in an application’s proprietary database or similar things.
            To get this handled we would need not only a read only layer, but something which is taking care about saving all the intermittent data. Is this what will be working once the announcement in the above link will really be coming true?

  39. Hi Carl,

    i have a strange issue with the applayer in version 4.3.
    I build a applayer with Office 2013 SP1 KMS an published with the elastic methode to the users.
    If a user start a word or excle document from redirect Desktop Folder , he become a flicker issues after closed the documents.
    If the user move the documents into a folder on redirect Desktop an start again it is ok.

    I dont now it is a bug or is this normal ?

    BR,
    Thomas

    1. What Operating System version?

      You think this is caused by Elastic Layers and not a general OS bug?

  40. Hi Carl,

    I am trying to figure out what would be the use case in our environment for Citrix App Layering. We are using XenDesktop 7.14 to provide end users VDI’s and also applications (the XenApp way). The main thing we need to provide is browsers with different Java-versions. We are using vSphere and MCS to deploy both the VDI’s and the Servers providing just the applications.

    Right now we have a different golden images for every Java-version. So we have e.g. Windows Server 2012 R2 with Java 6 Update 60, another Windows Server 2012 R2 with Java 7 Update 80 etc. Same thing with the Desktop OS’s.

    From what I’ve understood, with App Layering (Elastic Layers) it is still not possible to provide different Java versions for the same VDI depending on the user who logs in. So this is not possible:

    User logs in to VDI and get’s Java 6 update 60. Another user logs on to the same VDI and gets Java 7 Update 80. Like you mentioned here, layering does not isolate the applications.

    We also publish browsers with different Java versions (the XenApp way).

    I am just trying to figure out here what benefit would the App Layering bring us comparing to the current model. Any chance you could enlighten me? 🙂

    1. It helps if you have identical applications in multiple images and only want to update the apps once.

      1. Thanks! From MCS perspective the idea is that you can more easily manage the golden images, am I right? So with App Layering you can deploy new golden image which, in turn the MCS will use to deploy x number of new VM’s? Does App Layering help when you need to install patches to the VM’s deployed from the golden image? Is it easier with App Layering, and could you give an example of how the OS Layer is updated?

        1. You can have multiple MCS Catalogs/images based on a single Unidesk OS image. When you update the Unidesk OS image, it updates all of the MCS Catalogs, even if they have different apps layered in.

          1. When you say “update the Unidesk OS image”, are you talking about updating the VM that was published from the ELM, or update the OS layer in the ELM, and then publish an updated layered image (VM) to vcenter.

            In the case of the later, I am not sure how the MCS catalog will use this updated layered image since the VM it creates has a unique name. The snapshot that the MCS Catalog uses is based off of a different VM.

            Can you help me reconcile this?

          2. I meant: create a new version of the OS Layer. Update the Image Templates to use the new OS version. Publish the Image to hypervisor. Then use MCS to update the Catalogs.

  41. Carl,

    Thanks for the instructions! I am getting the error below right after I logged in. Any ideas? I did skipped some of the optional configuration you mentioned.

    Citrix App Layering – Error

    We were unable to load the required configuration files. You may not be able to access some of your applications. And, any changes you make to application settings or data will not be saved. Be sure to save any work to a shared network location.

    Unable to find the folder specified.

    1. Do you see the Elastic Layers in the file share?

      Do users have permissions to read the files in the file share?

    1. I don’t think so. And I don’t it’s necessary either since it has no effect on the deployed machines. You should back it up, of course.

  42. Hi Carl,
    I have created 3 App layer .1 MS-Office 2. VLC Player 3. Adove reader
    And assign to domain users through Elastic assignment, User can see and access 1 MS-Office 2. VLC Player but unable to see & Access Adove Reader

  43. Carl,

    What version of VMware vSphere were you running when creating this guide?

    I was trying to use Server 2016 on vSphere 5.5 and keep getting the following error trying to make a platform layer.

    “A failure occurred while deploying the virtual machine. The error is ‘Cannot read property ‘$value” of undefined’ ”

    My initial thought is since im using an older version of vSphere, server 2016 is not an option when deploying a VM and i had to use Server 2012 where it asks about the Guest Operating System version in the initial VM deployment.

    Thanks
    Trent

      1. Carl,

        Is it @ 6.5 update 2? Just curious about compatibility with Citrix 7.15 and 6.5 U2.

  44. Hi Carl, how manage the PVS cache disk for target device when using Citrix App Layering? Should I have to add a disk during the platform layer creation?
    Regards

  45. Hey Carl, like everyone else, i think your website really is off the charts! It’s so unbelievably helpful!

    I’ve got a question though: Are elastic layers by default shown to everyone that logs on to the XenApp server?
    I’ve made a template of Win2K12 with PVS tools and made an elastic layer of 7zip.
    I gave the rights of the elastic layer to a test group and made one account member of it.

    But all the AD accounts that log in, see 7zip in Windows explorer.

    Did i miss something? Or is this normal behavior?

    1. Citrix tells me that the context menu handler should be isolated to the users that are assigned to the Elastic Layer. Either there’s a misconfiguration, or a bug. You might have to call Citrix Support.

      1. Thanks.

        Maybe i’ve overlooked something, but the only thing i see is the root folder (c:\program files\7zip), but not the files beneath it. So maybe that’s standard functionality.
        I will ask Jeff Pitsch from Unidesk this upcoming friday (at a seminar where he presents).

        Will give his response here afterwards.. 🙂

  46. Carl, how have you been defining the PVS device collection with overflow disks? Previously you would create a master target, attach a D drive for overflow/persistent folder structure, and then use a PVS device wizard to spin off X total PVS targets using a template based off of the master target. I think when you do publish image #2 operation from the Unidesk console, that new PVS vDisk file has no knowledge of a D drive and pointers to it for persistent folder locations like D:\EventLogs, etc.

    1. Preston, have you managed to figure this out? my write-cache is getting redirected to server instead of drive d and I think my unidesk created image is not aware of my drive d

      1. We pushed the PVS vdisk (cache to server) to 1 PVS target. We then added a D drive on that target using its VM settings and then disk management in the VM. We created necessary redirect folders on it (e.g. D:\spooler). Then we shut it down and created a VM template from it. PVS streamed wizard was then used to generate desktops from it. GPO was used to set the pointers to redirect locations on the D drive (e.g. spooler, event logs).

  47. Spot on as always. Thanks 🙂 When you have published an updated image, you have to go in to Citrix Studio and change machine in machine catalog manually there, correct?

Leave a Reply to Dazza Cancel reply

Your email address will not be published. Required fields are marked *