You are here: Learn about Citrix App Layering [UnideskVersion Layering 4.0.8] > Layer > OS Layer > In MS Azure

Add a version to an OS Layer (Azure)

In this article:

Before you start

Add a Version to an OS Layer

Deploy a Packaging Machine

Install your changes

Verify the Layer and shut down the Packaging Machine

Finalize the OS Layer

Reference: Create OS Version Wizard values

The Unidesk Operating System (OS) Layer contains the Windows Operating System that is assigned to any Unidesk Layered Images you create using that OS Layer. Once created, you can use the OS Layer to build as many Layered Images as you want.

The OS Layer includes a virtual machine in your infrastructure running the Unidesk-supported Windows Operating System that you want to use for your Layered Images.

Before you start

Before you can create an OS Layer version, you'll need to:

Add a version of an OS Layer

To add a version of an OS Layer, take the following steps:

  1. In the Unidesk UMC, select Layers > OS Layers.

  2. Select or right-click an OS Layer icon and click Add Version. This opens the Create OS Version Wizard.

  3. (Required) In the Version Details tab, enter a version identifier. This can be the application version, or anything you choose.

  4. In the Connector tab, select a Connector Configuration for the platform where you'll be publishing your Layered Images. If you have not yet created a Platform Connector configuration or if the configuration you need is not present, click New to create a new Connector Configuration and select it from this list.

  5. Packaging Disk tab - Specify the file name and format of the packaging disk.

  6. Confirm and Complete tab - Verify your settings and click Create Version. Unidesk runs the task of creating a new OS version. When the task completes, it shows a status of Action Required and contains the following text:

    "The Packaging Disk has been published to Azure. Click here to create a Packaging Machine and install your app. When the app installation is complete, finish creating the new Layer Version by clicking Finalize on the Action bar."

  7. Expand the Tasks bar at the bottom of the UI, and double-click the Packaging Disk task. In the description, either Click here, or copy the link to Azure portal where the Packaging Disk has been published. Click the link in the task to open the Custom deployment window in Azure. Unidesk has pre-populated the fields of the Custom VM window with default values. Log into Azure and create the VM.

  8. Log into the new VM and install any apps on it that you want to include in the new version of the OS, such as Windows Updates or anti-virus software.

Next, you can deploy a Packaging Machine for this OS Layer.

Deploy a Packaging Machine

The Packaging Machine is a virtual machine where you install any applications or updates you want to include in this Layer. Typically, we recommend using a unique VM for each Layer.

Azure environment

To deploy your Packaging Machine to Azure:

  1. Click the link (shown in red below) in the Unidesk Management Console task to open the Azure portal to the Custom deployment area where you can create the virtual machine that you will use as your Unidesk Packaging Machine.

    Note: We recommend that you log into the Microsoft Azure account that has the same Subscription before clicking the link or pasting it into a browser.

  2. Complete the required fields for customizing your Azure parameters.

Notes:

Install your changes

This section explains how to install your changes on the Packaging Machine you created in Azure.

To make changes to this version of the OS Layer:

  1. Remote log into the Packaging Machine you created in Azure.

    Note: The User Name and Password to use when you log into the Packaging Machine are the same User Name and Password that were used when the OS Machine was created for the current OS Layer.

  2. Install any updates or applications you want to include in the new OS Layer version, such as Windows Updates or anti-virus applications.

    If an application installation requires a system restart, restart it manually. The Packaging Machine does not restart automatically.

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

Next, shut down the Packaging Machine when you have verified that the Layer is ready to finalize as described in the following section.

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

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:

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 OS Layer

Once the Packaging Machine is created and any apps or updates installed, you'll need to finalize the layer.

Note: When you finalize a new version of an OS Layer, Unidesk deletes the Packaging Machine so as not to incur more costs.

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.

Reference: Create OS Version Wizard values