Select your version:

Create a Platform Layer (Azure connector)

In this article:

Create a Platform Layer (Azure connector)

Prepare a new Platform Layer

Deploy a Packaging Machine

Install the platform software

Verify the Layer and shut down the Packaging Machine

Finalize the Layer

A Platform Layer is intended to include the platform software and settings required to deploy images in your environment. For example, a Platform Layer for publishing to PVS in vSphere with XenApp as the broker would include the PVS Target Device Imaging software, vmTools, and the XenApp Virtual Delivery Agent Installer (and other platform-related software as well).

You can create two kinds of Platform Layers:

  • Platform Layers for publishing Layered Images (Required) - These Layers include the software and settings required for a Layered Image to run flawlessly in your environment.

  • Platform Layers for packaging Layers (Required in some cases) - These Layers include the hypervisor software and settings you need to easily install the software for your other layers on a VM in your hypervisor environment.

Prerequisites

When creating a Platform Layer, the software installers for your platform must be available in a location that's accessible to the Packaging Machine VM where you are going to create the Layer. As summarized in the following table, the prerequisites vary based on the type of Platform Layer you choose to create.

Type of Platform Layer Prerequisites
Publishing Layered Images

Software installers, and settings you use for your:

  • Hypervisor
  • Provisioning service
  • Connection broker
Packaging Layers

The software and settings for your:

  • Hypervisor

For example, your hypervisor installer and settings.

Note: You only need a Platform Layer for packaging Layers if you are creating your Layers on a different hypervisor than the one from which you imported your OS image.

Prepare a new Platform Layer

  1. Select Layers > Platform Layers and select Create Platform Layer in the Action bar. This opens the Create Platform Layer wizard.

  2. In the Layer Details tab, enter a Layer Name and Version, both required values. Optionally, you can also enter other values. For details, see more about these values below.

  3. In the OS Layer tab, select the OS Layer you want to associate with this Platform Layer.

  4. In the Connector tab, choose a Connector Configuration for the platform where you are creating this layer. If the configuration you need isn't listed, add a NewConnector Configuration and select it from this list.

    Example: If you are creating the layer in a vSphere environment, select the vSphere connector with the information needed to access the location where you will package this layer.

  5. In the Platform Types tab, select the radio button that describes the purpose of this Platform Layer: to create and update layers, or to publish Layered Images. For more about these choices, see Platform Layer Essentials.

  6. From the dropdown menus, select the platform(s) you are using.

  7. In the Packaging Disk tab, enter a file name for the Packaging Disk, and select the disk format. This disk will be used for the Packaging Machine (the VM) where you will install the tools, as described in the next two sections.

  8. In the Icon Assignment tab, select an icon to assign to the layer. This icon represents the layer in the Layers Module.

    • To use an existing image, select an image in the image box.
    • To import a new image, click Browse and select an image in PNG or JPG format.
  9. In the Confirm and Complete tab, review the details of the App Layer, enter a comment if required, and click Create Layer. Any comments you enter will appear in the Information view Audit History.

  10. Expand the Tasks bar at the bottom of the UI, and double-click the Packaging Disk task to show the full task description.

    Once the Packaging Disk has been created, the Task bar displays the location of the Packaging Disk in your environment.

Next, you can deploy the Packaging Machine for your Layer.

Deploy a Packaging Machine

The Packaging Machine is a virtual machine where you install the app(s) you want to include in this Layer. It is strongly recommended that you use a unique Packaging Machine for each Layer. The Packaging Machine is a temporary VM that will be deleted once the Layer has been finalized.

Deploy a Packaging Machine to Azure

The Task Description (example shown in the last step above) contains a link to the location in the Azure portal where the Packaging Machine for this Layer has been published.

To create your Packaging Machine in Azure, begin with the expanded Packaging Disk Task shown in the last step above.

  1. Log into the Azure portal (https://portal.azure.com) from your web browser.
  2. In the expanded Packaging Disk Task shown below, copy the full URL and paste it into the web browser where you logged into the Azure portal. This opens the Microsoft Azure portal to the Custom deployment template where you can create the virtual machine that you will use as your Unidesk Packaging Machine.

    Note: We recommend copying the full URL instead of using the Click here link.

  3. On the Custom deployment panel, complete the required fields for customizing your Azure parameters.

    • Packaging Machine Name - must conform to Azure VM name requirements.
    • Size - the Azure VM size of the packaging machine.
    • Virtual Network and Subnet - the virtual network and subnet for deploying the Packaging Machine.

    IMPORTANT: Be sure that the value for the Resource group location matches the Storage account location that you configured in the Platform Connector Configuration. If these locations are not the same, the Packaging Machine will fail to deploy and you will have to reattempt deployment. If your deployment does fail, you can simply re-paste the link into the browser to start over.

Install the platform software

This section explains how to install your application(s) on the Packaging Machine you created in Azure. Keep in mind that the state of the software before you finalize the layer is what users experience when they access it.

To install the application(s):

  1. Remote log in to the Packaging Machine you created in Azure. Be sure to log in using the User account you used to create the OS in Azure.

  2. Install the Azure hypervisor software, along with any drivers, boot-level applications, or files that you need for packaging Layers in Azure.

  3. Make sure the Packaging Machine is in the state you want it to be for the user:

    • If the software you install requires any post-installation setup or registration, complete those steps now.
    • Remove any settings, configurations, files, mapped drives, or applications that you do not want to include on the Packaging Machine.

Next, you'll need to shut down the Packaging Machine and verify that the Layer is ready to finalize.

Verify the Layer and shut down the Packaging Machine

Once the application is installed on the Packaging Machine, the next step is to verify that the Layer is ready to be finalized. To be ready for finalization, any required post-installation processing needs to be completed. For example, a reboot may be required, or a Microsoft NGen process may need to complete.

To verify that any outstanding processes are complete, you can run the Shutdown For Finalize tool (icon below), which appears on the Packaging Machine's desktop.

To use the Shutdown For Finalize tool:

  1. If you are not logged into the Packaging Machine, remote log in as the user who created the machine.
  2. Double-click the Shutdown For Finalize icon. A command line window displays messages detailing the layer verification process.
  3. If there is an outstanding operation that must be completed before the Layer can be finalized, you are prompted to complete the process. For example, if a Microsoft NGen operation needs to complete, you may be able to expedite the NGen operation, as detailed below.
  4. Once any pending operations are complete, double-click the Shutdown For Finalize icon again. This shuts down the Packaging Machine.

The Layer is now ready to finalize.

Layer integrity messages you may see during the finalization process

Layer integrity messages let you know what queued tasks must be completed before a Layer is finalized.

The new Layer or Version can only be finalized when the following conditions have been addressed:

    • A reboot is pending to update drivers on the boot disk - please check and reboot the Packaging Machine.
    • A post-installation reboot is pending - please check and reboot the Packaging Machine.
    • An MSI install operation is in progress - please check the Packaging Machine.
    • A Microsoft NGen operation is in progress in the background.

      Note: If a Microsoft NGen operation is in progress, you may be able to expedite it, as described in the next section.

Expediting a Microsoft NGen operation

NGen is the Microsoft Native Image Generator. It is part of the .NET system, and basically re-compiles .NET byte code into native images and constructs the registry entries to manage them. Windows will decide when to run NGen, based on what is being installed and what Windows detects in the configuration. When NGen is running, you must let it complete. An interrupted NGen operation can leave you with non-functioning .NET assemblies or other problems in the .NET system.

You have the choice of waiting for the NGen to complete in the background, or you can force the NGen to the foreground. You can also check the status of the NGen operation, as described below. However, every time you check the queue status, you are creating foreground activity, which might cause the background processing to temporarily pause.

Forcing the NGen to the foreground will allow you to view the progress and once the output has completed, you should be able to finalize the layer.

  1. Force an NGen operation to the foreground.

    Normally, NGen is a background operation and will pause if there is foreground activity. Bringing the task into the foreground can help the task to complete as quickly as possible. To do this:

    1. Open a command prompt as Administrator.

    2. Go to the Microsoft .NET Framework directory for the version currently in use:

      cd C:\Windows\Microsoft.NET\FrameworkNN\vX.X.XXXXX
    3. Enter the NGen command to execute the queued items:

      ngen update /force

      This brings the NGen task to the foreground in the command prompt, and lists the assemblies being compiled.

      Note: It’s okay if you see several compilation failed messages!

    4. Look in the Task Manager to see if an instance of MSCORSVW.EXE is running. If it is, you must allow it to complete, or re-run ngen update /force. Do not reboot to stop the task. You must allow it to complete.
  2. Check the status of an NGen operation

    1. Open a command prompt as Administrator.

    2. Check status by running this command:

      ngen queue status
    3. When you receive the following status, the NGen is complete, and you can finalize the Layer.

      The .NET Runtime Optimization Service is stopped

Finalize the Layer

Once the Packaging Machine is created, the platform software is installed and ready to finalize, and you have shut down the machine, you'll need to finalize the layer.

Note: When you finalize a Platform Layer, Unidesk deletes the Packaging Machine.

When a layer is ready to finalize:

  1. Return to the Unidesk Management Console.
  2. In the Layers module, select the layer.
  3. Select Finalize in the Action bar.
  4. Monitor the Task bar to verify that the action completes successfully and that the layer is deployable.