Jump to content
Updated Privacy Statement
  • Citrix App Layering 4 LayerPriority Utility


    Rob Zylowski

    Version4.5.zip

    Overview

    This utility modifies the layer priority of App layers. The documentation provided here includes an explanation of layer priority, why you might want to change it, and how you would use the utility.

    What is Layer Priority?

    Layer Priority defines the order in which layers are searched for a file or registry settings when using elastic layers or the order in which layers are merged when creating a disk image.

    In Citrix App Layering 4, the default layer priority matches the layer id within our database.  Ids always get larger as layers are created.  So if the first version of layer AppB was created after the first version of layer AppA, then layer AppB will be at a higher priority than layer AppA.  This means that if there is a file or registry entry in common between the two layers, the file or registry entry will be used from layer AppB.

    When Windows views these layers, it is from a top-down model where the highest priority wins. So if a file (or registry entry) exists in two layers, but only one can be presented to an executing Windows environment, the layer with the highest priority “wins”.

    Images versus Elastic Layers

    Layer priority is used in two different places.  When creating an image layer, priority is used both when creating the file system and the registry.  The best way to think of it is that the layers are merged in this order for both file system and registry:

    rhFE3WS2oM2jkkmkcgvYSiYE1wvhDZ-W32PHWd8F

    So, the App Layer with priority 1 is merged into the OS layer, then the App Layer with priority 10, then 100, and finally the Platform layer. File or registry keys from the layers merged before are overwritten as new layers are merged in.

    Then, on session hosts or desktops, elastic layering layer priority is applied dynamically to both the file system and the registry.  The main difference here is that the Published image is at the bottom and the User Personalization Layer is at the top regarding priority.  The order is shown here:

    arxCDVCxORj49JqxTAf14sW3Yk0HeosgMhAbMMFd

    Why would I change the priority?

    You might want to change layer priority for many reasons.  Normally, it is because two different layers use a common file or registry key, and you find by switching the order of the layers, both applications will work when originally only one did. 

    Installing the Utility

    The utility is easy to install.  Download the Zip, edit the properties of the zip, unblock it, unzip the files into a folder, and run the HTARunAs reg file.  This will allow you to right-click on the HTA file and run it “As Administrator”.  This is required, or the plink command cannot save the ELM’s certificate to the registry.

    Then start the utility and click on Setup.

    Enter the IP address or FQDN for the ELM.  The utility works by sending ssh commands to the Enterprise Layer Manager to query and update the layering database.  This information is used for that communication.

    If you have not changed the appliance root password, click save. This will encrypt the password and store it in a file in the utility's config folder, which will be used to perform the queries. If you want to be prompted for the password each session rather than storing it encrypted, select the check box to always prompt before clicking save.

    PFEaRd6VS41woaVmAmcbijfgqGzn9T8j9q0Qb3Eo

    Warning

    Do not run the utility if you have active tasks running in the console. The Tasks could have their database entries locked, or they may be adversely impacted by the change mid-way through the task.

    Using the Utility

    The utility is easy to use. Open the utility and click “Get SO Layers.” This will run a query to capture all the OS layers you have. The utility will store the OS layers for use whenever you open it. If you add a new OS layer, click “Get OS Layers” again.

    Then to see or change the priority of a layer, first choose the appropriate OS layer.  The utility will load all the layers created with that OS layer with the highest priority on top.

    vUJr4XPBJNfOBYKlfRQnsy5qado87E6GhRyE4bzH

    Note the Search box for layers.  This can narrow the layer listing by filtering for a text string in the layer name.  For Example, list all the layers with “off” in the layer name.  To use it enter the string in the Search box and press enter or click the right arrow.

    VsU9W19nWtQqe9PtWCAiH8A_DTL6vTYYapnJUZVZ

    Select a layer to change the priority by clicking on the row and then click “Set Start”.

    IZLZSUyPDGsUiBgT-CfH_HlufuhUGb7t-MS3PtVL

    Then select the row to move the selected layer above and click “Set End.”

    T2qJr6H12wDYNqDzFgXYxUTWhaFU6ngGH9_c24ew

    The selected layer information will be shown at the bottom.

    J2J1ktVVpzm-S8i99nOkN9HVWhsKFKr41KmgiXQa

    Review the selected layer information and if correct click the “Process” button.

    The status of the job will be shown in the status area at the top.

    wINYNZlxn8doC1RVOGS8Al7Z7FrEJQYBblHaUNcX

    Also, the layers table will be redrawn with the new priorities shown again in priority order.

    The process will update the layering database with priority changes.  However this will not update the json files located on the elastic layer share.  Many changes can be made to the database then when you are done with changes you must click on the button shown below.  This will tell the ELM to write out new JSON files for Elastic Layering.


    SKYnxwRj9lyag_1bGMlBJI5DOpz2iytPxvXhaWb_

    Changing the layer priority for a single layer

    The normal modification process changes the priority for every layer between the start and end by swapping each layer's priority with the previous layer.

    At times, customers have requested the ability to change just the priority for a single layer. This has been to fix problems that went wrong in the update process.

    To change the priority for a single layer, click on the layer and then click on “Change Priority Value.” This will set the start and end rows at the bottom to both the selected layer and expose the input field (3) for the new value. Enter a value and Press the “Change” button (4).

    -AknaWZJo-emeJU9KDiOq4pXA9UxAnEdQ65Kw1nX

    The status of the update will be shown in the status box, and the table will be updated and resorted.

     

    Disclaimer

    Remember this tool is to be used at your own discretion and is not supported by Citrix.

    These software applications are provided to you as is with no representations, warranties or conditions of any kind.  You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application.  In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities.  NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.

     

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...