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

Prepare the OS Image (Azure)

This topic explains how to prepare an OS Image for the Unidesk environment.

Prepare a Windows 2012 R2 image (Session Host)

This topic explains how to prepare an OS Image for Session Hosts in the Unidesk environment.

Notes:

STEP 1: Set up a Windows Server 2012 R2 OS Image on a virtual machine

  1. In the Azure Portal, create a new VM from the "Windows Server Remote Desktop Session Host Windows Server 2012 R2" image (New > Compute > Virtual Machine > From Gallery > Windows Server Remote Desktop Session Host Windows Server 2012 R2).
  2. When specifying the Size of the virtual machine, we recommend you select A2 or larger.
  3. Important: When specifying the Cloud Service, select the same Cloud Service that contains your (Undefined variable: Unidesk.MA).
  4. Select the same Storage Account that contains your appliances, unless your appliances are in Premium Storage, in which case you must use a Standard Storage group.
  5. Log into the new VM, open a Windows PowerShell window, and run the Enable-PSRemoting command.
  6. Restart the new VM.

STEP 2: Apply Windows Updates

  1. Apply all Windows Updates to the image so that it is at the most current Microsoft patch level and complete any reboot processes that Windows Updates may require.

STEP 3: Copy the Unidesk Tools onto the OS Image

  1. Copy the Unidesk_OS_Machine_Tools RAR file onto the OS Image. You can find these tools in the Unidesk Download center.
  2. Run the RAR file. This copies the tools to the C:windows\setup\scripts directory.

STEP 4: Install the Unidesk tools onto the OS Image

  1. In the c:\Windows\Setup\Scripts folder, run Unidesk setup_x64.exe.

  2. The installation prompts for the location of the Management Appliance IP address and the location of the unattend.xml file (the default location is c:\windows\panther).

    Note: Do not run the UnattendBuilder included with the tools.

STEP 5: Run NGen

About Microsoft NGen operations

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.

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.

  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.

  4. Ensure that all NGen processes have run to completion. Optionally, you can now shut down the OS Image VM.

Once you have completed these steps, you are ready to create a Unidesk Operating System Layer.