App Layering – App Layers, Image Templates, and Publishing

Last Modified: May 18, 2017 @ 5:04 pm

Navigation

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. In the ELM Management Console, go to the Layers tab.
  2. Right-click in the grey, and click Create App Layer.
  3. 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.
  4. Give the layer a Max Size. The layer disk created for the vSphere Packaging Machine is Thick Provisioned. Click the down arrow.
  5. In the OS Layer page, select an OS Layer. An App Layer created for one OS Layer cannot be used with another OS Layer. Click the down arrow.
  6. In the Prerequisite Layers page, you can select additional layers to include in your packaging machine. If there are no dependent layers, just click the down arrow.
  7. In the Connector page, select a vSphere connector, and click the down arrow.
  8. In the Platform Layer page, 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 click the down arrow. The hypervisor can also be changed when publishing the Image Template later.
  9. In the Packaging Disk page, give the .vmdk file a name, and click the down arrow.
  10. In the Icon Assignment page, select an icon, or upload a new one, and click the down arrow.
  11. In the Confirm and Complete page, click Create Layer.
  12. At the bottom of the page, open the Tasks panel.
  13. Click the information icon next to the running task.
  14. Eventually the task will finish deploying the Packaging Machine.
  15. 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.
  16. See Layering Recipes for some application install instructions.
  17. When you are done installing your app, double-click the Shutdown for Finalize icon on the desktop.
  18. It will tell you any issues it finds. After correcting them, double-click the icon again to shutdown the machine.
  19. After the machine is shutdown, in ELM Management Console, go to Layers > App Layers.
  20. Right-click the Layer that is currently being Edited, and click Finalize.
  21. In the Script Path page, if you embedded any scripts in the layer, specify the path. Otherwise, just click the down arrow.
  22. In the Confirm and Complete page, click Finalize.
  23. You can view the running tasks in the bottom window pane.
  24. It will eventually finish and say Deployable.

Windows Updates – From Gunther Anderson at Unable to update O/S version. (ELM reverts back to older version) at Unidesk Forums: “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.”

Image/Template

  1. In the Management Console, go to the Images tab.
  2. Right-click in the grey, and click Create Template.
  3. In the Name and Description page, give the Template a Name that indicates the OS Layer, Platform Layer, and App Layers. Then click the down arrow.
  4. In the OS Layer page, select an OS Layer, and click the down arrow.
  5. In the Application Assignment page, 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.
  6. Note: 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.
  7. In the Connector page, select a Connector for the platform you want to push this image to. If publishing to MCS, select a vSphere Connector, and click the down arrow.
  8. If you are publishing to PvS, and if you don’t have a PvS Connector, click New.

    1. From Connector Configuration & Optional Script (PVS) at Unidesk.com.
    2. In the Choose a Connector Type window, select Citrix PVS, and click New.
    3. For info on the other connectors, see Connectors for publishing (vSphere environment) at unidesk.com.
    4. A new tab opens.
    5. Give the Connector a name. This Connector points to one PvS server, and one vDisk store, so the name should reflect that.
    6. The Console field contains the list of registered App Layering Agents running on PvS Servers.
    7. Enter credentials of a service account that is an administrator in PvS. Click Check Credentials.
    8. Scroll down. Use the drop-downs to select the vDisk store and other vDisk settings. Click Test.
    9. On the bottom, click Save.
    10. On the left, click Script Configuration.
    11. If you installed a PvS Connector Script, you can specify it here. Citrix has a script that can convert the published VHD file to VHDX, and add it as a Version. Click Save when done.  💡
    12. Then click Close.
    13. Back in the Connector page, select the PvS connector, and click the down arrow.
  9. In the Platform Layer page, select one Platform Layer, and click the down arrow. For PvS, make sure the Platform Layer includes both VDA and PvS Target Device Software.
  10. 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.
  11. If you wish to enable Elastic Layering, select it here. Assignment of Elastic Layers to users is described later.
    1. Note: when you enable Elastic Layering, the published image only gets 20 GB of free space due to the addition of a writable partition. See Disk space of the published VM at Unidesk forums.
  12. As of App Layering 4.2, User Layers for Windows 7 and Windows 10 (Windows Store disabled) is a Lab feature that can be optionally enabled at System > Settings and Configuration > Labs.
    1. User Layers have the same application compatibility limitation as Elastic Layers.
    2. Storage Locations for User Layers are configured at System > Storage Locations.
    3. If you tried the User Layers feature in App Layering 4.1, you’ll need to move the user layer disks as described at Upgrade User Layers created using a previous release at unidesk.com.  💡
  13. Click the down arrow.

    1. Notice that PvS does not have a SysPrep option.
  14. In the Confirm and Complete page, click Create Template.
  15. The Image is then displayed as Publishable.

Publish Image

  1. Right-click a publishable image, and click Publish Layered Image.
  2. In the Confirm and Complete page, click Publish Layered Image.
  3. Open the Tasks pane, and click 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. If you edit the VM’s hardware, you’ll see that the disk is Thick Provisioned.
    4. Power on the machine.
    5. If doing Citrix Machine Creation Services, there is no need to join it to the domain. Some other provisioning platforms might require the machine to be joined to the domain, which you can do now.
    6. Shut down the Template VM.
    7. For MCS, in Citrix Studio, create a Machine Catalog using the Template VM as the Master Image.
    8. Notice that MCS creates VMs in the same Virtual Machine folder as the Master Image.
  5. If publishing to 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.

Elastic Layers

  1. In the ELM Management Console, go to Layers > App Layers.
  2. Right-click a Deployable App Layer, and click Add Assignments.
  3. In the Select Version page, select an App Layer version, and click the down arrow.
  4. 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.
  5. 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.
  6. Search for a user group you want to assign this Layer to, and check the box next to the group. Click the down arrow when done.
  7. In the Confirm and Complete page, click Assign Layer.
  8. Open the Tasks pane to see the progress while it copies the App Layer to the remote SMB share.
  9. When it’s done, go to the SMB share to see the files it uploaded, including the .json files that contain Layer assignments.
  10. 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.
  11. Note: when you enable Elastic Layering, the published image only gets 20 GB of free space due to the addition of a writable partition. See Disk space of the published VM at Unidesk forums.  💡

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

Update Layers

  1. Right-click an App Layer, and click Add Version.
  2. In the Version Details page, enter a new version, and click the down arrow.
  3. In the OS Layer page, click the down arrow.
  4. In the Prerequisites Layers page, click the down arrow.
  5. In the Connector page, select a Connector, and click the down arrow.
  6. In the Platform Layer page, click the down arrow.
  7. In the Packaging Disk page, click the down arrow.
  8. In the Confirm and Complete page, click Add Version.
  9. The task details shows the current progress.
  10. When the Packaging Machine is deployed, you can connect to its console and perform any desired updates. When you are done performing updates, double-click the Shutdown for Finalize icon on the desktop.
  11. When done updating the Packaging Machine, right-click the App Layer that is marked as Editing, and click Finalize.
  12. In the Script Path page, click the down arrow.
  13. 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, 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. Right-click an Image, and click Edit Template.
    2. Click the Application Assignment page.
    3. Click the plus arrow next to a Layer and select the new version. Then complete the wizard.
  19. To update multiple images:
    1. 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.
    3. In the Image Template Assignment page, select the templates you want to update, and click the down arrow.
    4. In the Elastic Assignment page, if this App Layer is assigned to users, you can update them too. Click the down arrow.
    5. In the Confirm and Complete page, click Update Assignments.
  20. Once an image has a new version assigned, you must republish it.

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

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

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

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

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

  5. 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.. 🙂

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

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