Create the OS layer

An OS layer includes the software and settings for the operating system that you deploy as part of your layered images. The OS layer is required to create your platform layers, app layers, and layered images.

Two ways to create the OS layer

There are two ways to import the OS to create the OS layer:

The advantages of using an import script in Hyper-V and vSphere include:

  • Better performance: The OS import is significantly faster.
  • UEFI support: The script supports the impport of UEFI machines.


Before creating the OS layer, be sure to:

Considerations for your OS layer

  • To deploy Windows patches and updates, you can simply add a new version to the layer. This allowa you to easily revert to the previous version of the layer if necessary.
  • You can select any version of the layer to use in an image template, and therefore in the published images.
  • You can update the OS using Windows Update, Windows Server Update Services (WSUS), or offline standalone update packages. Do not use tools like SCCM.
  • Platform layers and app layers are tied to the specific OS layer that you use to create them, but they are not dependent upon a specific version of the layer. When you add new versions to the OS layer, the App and Platform layers dependent on the OS layer continue to work.
  • Windows updates must be applied to the OS layer before you update any other layers.

Import the prepared OS using the management console and a connector

To import your OS for the new OS layer, using the management console and the connector for your platform:

  1. In the management console, select Layers > OS Layers and click Create OS Layer in the Action bar. This opens the Create OS Layer wizard.
  2. In the Layer Details tab, specify a Layer Name and Version, both required values. Optionally, you can enter Descriptions of the Layer and Version, and change the Max Layer Size to accommodate the OS you are going to import.
  3. In the Connector tab, select a Connector Configuration that specifies the location of your clean OS image. If the configuration you need is not listed, add a New one, and then select it from this list. For details about adding a new connector configuration, see Add a connector configuration.
  4. In the OS Disk Details tab, click the Select Virtual Machine button.

    • Citrix Hypervisor, VMware, Nutanix: A new browser tab opens.
    • Azure: An Azure panel opens where you can type the Resource Group and the virtual machine name.
  5. Click the Virtual Machine field to reveal a list of all virtual machines.

    • Hyper-V: Generation 2 (UEFI) virtual machines are not listed, because they are not currently supported when createing an OS layer. Once you have an OS layer you can convert it to a UEFI layer by adding a revision to it and selecting a UEFI connector configuration.
    • VMware: UEFI virtual machines are listed, but not supported when creating an OS layer. First create a BIOS OS layer and then convert it to a UEFI OS layer by adding a revision to it and selecting a UEFI VM template in the connector configuration page.
  6. Select a machine from the list, or start by typing the name to filter the list to virtual machines that contain the search text, and then select the machine.

    • Azure: Type the Resource Group and the virtual machine name.
  7. Click OK. The selected machine is validated:

    • Citrix Hypervisor, VMware, Nutanix: Ensures that the machine has a single OS disk attached as a SCSI disk. IDE is not supported.
    • Hyper-V: Ensures that the machine has a single disk attached to the IDE controller for Generation 1 (UEFI) virtual machines. The virtual machine that the disk is attached to must be shut down.

    If there are problems with the virtual machine or OS Disk, an error is displayed. Otherwise, you are returned to the wizard where the machine’s name and the size of the OS disk are listed.

  8. In the Icon Assignment tab, select an icon image to assign to this layer.

  9. In the Confirm and Complete tab, review the details of the OS layer, enter a comment if required, and click Create Layer. If you enter comments, they appear in the Information view Audit History.

When the task completes, the new OS layer in the management console displays a Deployable status.

Import the OS using the ImportOSLayer.ps1 script (MS Hyper-V, VMware vSphere only)

This procedure explains how to import the OS for your new OS layer using the ImportOsLayer.ps1 script.

If you have downloaded and expanded the App Layering OS Machine Tools onto your OS image, the ImportOsLayer.ps1 has been copied to c:\windows\setup\scripts.

Run the script

To import the OS:

  1. Run the ImportOsLayer.ps1 PoSH script as administrator:

    C:\Windows\Setup\scripts\ImportOsLayer.ps1 -ElmAddress <Ip Address> [-IgnoreCertErrors]
    C:\Windows\Setup\scripts\ImportOsLayer.ps1 -ElmAddress <FQDN> [-IgnoreCertErrors]


    • ElmAddress is the IP Address or FQDN of the App Layering appliance. This specifies where the new OS layer is created.
    • IgnoreCertErrors ignores certification errors when the script communicates with the App Layering appliance.
  2. The ImportOsLayer.ps1 script prompts you for the credentials to connect to the App Layering appliance (referred to as the ELM in the script). The script uses your credentials to create a new session on the appliance.

  3. The script then prompts you for details about the new OS layer:

    • LayerName (required)
    • VersionName (required)
    • LayerSizeGib (required, but defaults to 60 GB)
    • LayerDescription (optional)
    • VersionDescription (optional)
    • Comment (optional)

    Once you’ve entered the required information, the script reboots the system into the compositing engine, imports the OS and builds the layer. You can monitor the progress of the job in the management console.

    When the compositing engine is finished (success or failure), it reboots back into the Windows OS image.