Create Platform layer
A Platform Layer includes the platform software and settings required for your layers and layered images to run flawlessly in your environment.
You can create Platform Layers for two purposes:
For creating and packaging layers: Use this type of Platform layer for creating App layers when you’ve imported the operating system for your OS layer from a different hypervisor than the one on which you are building your layers.
For publishing layered images: Use this type of Platform layer in your image template so that the published layered images run flawlessly in your environment.
Platform layers for packaging layers or publishing Layered Images
Use the following table to determine whether you need a Platform layer, and if you do, what software to install on it.
Platform Layer for Packaging Layers
Platform Layer for Publishing Layered Images
When to use
Use to create App layers if your OS image was imported from a different hypervisor than the one where you are creating layers.
This layer is NOT necessary if your layered images are running on the hypervisor from which your OS image was imported.
Use if the environment includes a provisioning service and/or a connection broker.
What to include
If you are creating layers on the same hypervisor as the one from which you imported the operating system, you do not need a Platform layer for packaging App layers or for new versions of the OS layer.
When creating layers on a hypervisor other than the one from from which you importing the operating system for the OS layer, install the tools and configure the settings for the hypervisor where your App layers will run.
Install the provisioning service and connection broker software and settings required to run your layered images. If the appliance is running on a different hypervisor than the provisioning service or hypervisor you are publishing to, also include your hypervisor tools.
What you need
The software and settings for the hypervisor on which your Layered Images will run.
The software and settings for the environment where your Layered Images will run. Includes your:
- Provisioning service software
- Connection broker agent
If the appliance is running on a different hypervisor, you also need your hypervisor tools and settings.
Other software and settings you can include in the Platform layer
In addition to the basic platform tools and settings, iclude the following in the Platform layer
- Domain join
- NVIDIA Drivers, if applicable
- Citrix Receiver, for the Single Sign-on component
- Citrix Workspace Environment Management(WEM) agent
- Any software that impacts the logon stack, for example, Imprivata
Process for creating a Platform layer
The general steps for creating a Platform Layer are to:
- Complete the Create Platform Layer wizard in the management console.
- Connect to and log into the packaging machine.
- Install your provisioning service and connection broker software.
- If the App Layering appliance is installed on a different hypervisor than the one you are creating layers for or publishing images to, also install the hypervisor tools in this layer.
- Verify the layer and shutdown the packaging machine.
- Finalize the layer.
When creating a Platform layer, the software installers for your platform must be available in a location that’s accessible to the packaging machine where you are creating the layer. This includes your provisioning service and connection broker. And if the appliance is running on a different hypervisor, include the hypervisor tools for the platform you are layering and publishing.
For detailed requirements, select the environment where your layers will be created and packaged, or your layered images published:
- Citrix MCS in Azure
- Citrix MCS in Nutanix AHV
- Citrix MCS in vSphere
- Citrix MCS in XenServer
- Citrix PVS
- Citrix XenServer
- MS Azure
- MS Hyper-V
- Nutanix AHV
- VMware Horizon View in vSphere
- VMware vSphere
- Network File Share (other platforms)
Start a new Platform layer
To create a Platform layer you prepare the layer using the Create Platform Layer wizard, deploy a packaging machine in your environment, install the tools and configure the settings for your environment, and finalize the Layer.
Select Layers > Platform Layers and select Create Platform Layer in the Action bar. This opens the Create Platform Layer wizard.
In the Layer Details tab, enter a Layer Name and Version, both required values. Optionally, you can also enter other values.
In the Version Details tab:
- (Required) Enter a name for the New Version. This can be the software version or other identifying information.
- If you are adding a version to an existing layer, the Base Version field lets you choose which version to use as the starting point. The default choice is the latest version.
In the OS Layer tab, select the OS Layer you want to associate with this Platform Layer.
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, select New. Then,add a connector configuration, and select it.
In the Platform Types tab, select This platform will be used for publishing layered images, or This platform will be used for packaging, and the hpervisor, provisioning service, and connection broker to which you will be publishing the layered image. Note: If you are not using a provisioning service or a connection broker, select None for each of those.
In the Packaging Disk tab, enter a file name for the packaging disk. This disk will be used for the packaging machine (the virtual machine) where you will install the tools, as described in the next two sections.
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.
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.
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 Tasks 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
When you’ve completed the Create Layer wizard, the App Layering system creates a packaging machine (a virtual machine) in the location defined in the connector configuration. The packaging machine is a temporary virtual machine where you install the software to be included in the layer. It is deleted once the layer has been finalized.
XenServer, Hyper-V, Nutanix AHV, VMware vSphere
The appliance creates the packaging machine in the location defined in the connector configuration.
- Go to the App layering management console, expand the Tasks bar at the bottom of the console, and open the Create Platform layer task to get the name of the packaging machine.
- Log into your hypervisor management console. (XenServer, Azure, Hyper-V, Nutanix, or VMware)
- From the hypervisor manager console, navigate to the packaging machine. If the packaging machine is not yet powered on, do so now.
- Go to the App layering management console, expand the Tasks bar at the bottom of the console. Open the Create App layer task details.
- Use the link in the task details to navigate to the packaging machine in Azure. The Custom deployment panel opens.
- Log into the Azure portal (https://portal.azure.com).
- Set the Azure parameters.
- Packaging Machine Name - must conform to Azure virtual machine name requirements.
- Size – virtual machine size.
- Virtual Network and Subnet - for deploying the packaging machine. IMPORTANT: Make sure the value for the Resource group location matches the Storage account location that you configured in the connector configuration. If these locations are not the same, the packaging machine fails to deploy. If your deployment does fail, you can paste the link into the browser again and start over.
- Once your packaging machine is powered on, you can install the application(s) you want to include in the layer.
Any other Hypervisor (via Network File Share)
Locate the Packaging Disk in the following directory on the Network File Share: \Unidesk\Packaging Disks
Copy the Packaging Disk to a separate location on your hypervisor. This allows space for the files generated by your hypervisor when you use the disk to create a new virtual machine.
IMPORTANT: Do not copy the disk to the Finalize folder until it is ready to finalize. A disk in the Finalize folder cannot be attached to the new virtual machine that you are going to create next.
Create a virtual machine using the packaging disk as the boot disk.
Power on the packaging machine.
Once your packaging machine is powered on, you can install your platform tools in the layer.
Install the platform tools on the packaging machine
Now it’s time to install the software for the platform where you are publishing your layered images. This includes the provisioning service, connection broker software that your layered images will need to run in the target environment. Keep in mind that the state of the software before you finalize the layer is what the image will use.
- Remote log into the packaging machine. Be sure to log in using the User account you used to create the OS.
- Install the tools that your layered image will need to run in your environment. This includes any provisioning service, connection broker, and hypervisor tools you are using, along with any drivers, boot-level applications, and files needed.
- If the installation requires a system restart, restart it manually. The packaging machine does not restart automatically.
- Make sure the packaging machine is in the state you want it to be in when the image is booted:
- If the tools you install require 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.
Verify the Layer and shut down the Packaging Machine
Once the tools are installed on the Packaging Machine, the next step is to verify that the Layer is ready to finalize. At this point, 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 shut down the packaging machine so you can finalize the layer
- If you are not logged into the packaging machine, remote login using the account set up during OS layer creation.
- Double-click the Shutdown For Finalize icon. A command line window displays messages detailing the layer verification process.
- 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.
- 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.
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:
Open a command prompt as Administrator.
Go to the Microsoft .NET Framework directory for the version currently in use:
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.
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.
Check the status of an NGen operation
- Open a command prompt as Administrator.
Check status by running this command:
ngen queue status
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 software has been installed and the packaging machine has been verified and shut down, you are ready to finalize the layer.
XenServer, Azure, Hyper-V, Nutanix AHV, VMware vSphere
Now that the Layer has been verified and shut down, it is ready to finalize.
- Return to the management console.
- Select Layers > Platform layers, and then the layer you just prepared.
- Select Finalize in the Action bar. The Finalize wizard opens.
- Click Finalize to finish creating the layer.
- Monitor the task bar to verify that the action completes successfully.
Once the layer is verified, the packaging machine is removed to minimize storage space used.
Any other hypervisor (via Network File Share)
Now that the Layer has been verified and shut down, it is ready to finalize.
Copy the Packaging Disk from the folder containing the packaging machine files to the Finalize folder on the Network File Share: \Unidesk\Finalize
Return to the management console.
Select Layers > Platform Layers.
Select Finalize in the Action bar.
Monitor the Task bar to verify that the action completes successfully and that the layer is deployable.
Create Platform layer
In this article
- Platform layers for packaging layers or publishing Layered Images
- Process for creating a Platform layer
- Start a new Platform layer
- Deploy a Packaging Machine
- Install the platform tools on the packaging machine
- Verify the Layer and shut down the Packaging Machine
- To shut down the packaging machine so you can finalize the layer
- Finalize the Layer
- Any other hypervisor (via Network File Share)