Step-by-step guide to learn how to create and optimize a new Platform layer with Citrix App Layering.

More from the Lab!

 

We discussed in the previous posts of this Citrix App Layering series how to install and configure the appliance. We also reviewed how to work with OS layers in App Layering. In this post, we will create our first Platform Layer and optimize that layer with best practices.

More from this Citrix App Layering series

Platform layers are designed to support your environment. A platform layer includes your hypervisor tools and settings. The tools and settings make it easy to create layers by using virtual machines in your hypervisor environment. A platform layer that includes your hypervisor, provisioning service, and connection broker software isolates App and OS layers from the infrastructure where they are published.

Source: Citrix Documentation

Requirements

For this lab, you need the following:

Best Practices for Platform Layer in Citrix App Layering

  • Platform Layer has the highest priority of all layers. This layer will be applied last.
  • Install Citrix Virtual Desktop Agent (VDA), Receiver/Workspace App, WEM and PVS Target Device software in the Platform Layer
  • Do not install Windows Updates in this layer
  • Join the machine to the domain
  • Logon with a domain account to cache data in the layer. This will improve logon time.
  • The Platform layer has the highest priority when creating the layered image.  This means it is applied last so its settings will override all other layers.
  • Single Sign-on applications must be installed in this layer (Ex: Imprivata)
  • Video drivers (nVidia, AMD) can be installed in this layer
  • Do not disable iPV6 (for PVS). Do it in the OS Layer.
  • Changes made to local users and groups are not saved in this layer. Use GPOs instead.
  • You can add additional disks but you must remove them before finalizing the disk in the ELM console
  • If you want to deploy this image on a different hypervisor, install the hypervisor tools in this layer.
  • Check this link for more best practices
  • To have a Write Cache disk with PVS, you must attach the same disk to the Platform Layer. Install it in the layer. Then shutdown the layer and remove the disk before finalizing (See CTX232126).
  • Run Citrix Optimizer to apply Citrix optimizations. Windows optimizations were applied in the OS layer in the previous post.

Create a new Platform layer in Citrix App Layering

Go to ELM console > Layers > Platform Layer and select Create Platform Layer.

Create Platform Layer
Create Platform Layer

Click on Create Platform Layer.

Enter layer details:

Create Platform Layer - Layer details
Create Platform Layer – Layer details

Select the OS Layer.

Create Platform Layer - Select OS Layer
Create Platform Layer – Select OS Layer

Select the connector to be able to browse the virtual machines.

Create Platform Layer - Select Connector
Create Platform Layer – Select Connector

Select Platform types.

Create Platform Layer - Select Platform types
Create Platform Layer – Select Platform types

Enter a disk filename.

Create Platform Layer - Enter Packaging Disk
Create Platform Layer – Enter Packaging Disk

Assign an icon.

Create Platform Layer - Icon assignment
Create Platform Layer – Icon assignment

Select Create Layer to confirm.

Create Platform Layer - Confirm
Create Platform Layer – Confirm

Creation in progress.

Create Platform Layer - In progress
Create Platform Layer – In progress

ELM will create 2 new disks in the /mnt/repository/Unidesk/Packaging Disks/ folder in the App Layering Repository.

Create Platform Layer - Disks are being created in the repository
Create Platform Layer – Disks are being created in the repository

The last step is copy the disks in the cache.

Create Platform Layer - Disks are being copied in the cache
Create Platform Layer – Disks are being copied in the cache

Note: disks are thick provisioned. 

Once the disks are copied in the cache, ELM will start the virtual machine for editing.

Create Platform Layer - Ready for editing
Create Platform Layer – Ready for editing

The virtual machine is now available in the Hyper-V console:

Create Platform Layer - Virtual Machine for Editing
Create Platform Layer – Virtual Machine for Editing

In Hyper-V console, we can see that 2 disks are mapped the virtual machine.

Create Platform Layer - Virtual Machine configuration
Create Platform Layer – Virtual Machine configuration

Connect to the virtual machine.

Create Platform Layer - Virtual Machine for packaging
Create Platform Layer – Virtual Machine for packaging

Add the virtual machine to the domain. Reboot and then logon with a domain account to cache domain information in the layer.

Create Platform Layer - Add to domain
Create Platform Layer – Add to domain

Note: move the computer object in the correct OU. 

Install Citrix Virtual Desktop Agent, Citrix Receiver/Workspace app and then PVS Target Device (if needed).

Create Platform Layer - Install VDA
Create Platform Layer – Install VDA

Note: Make sure you have installed Microsoft Visual C++ libraries in the OS Layer or VDA will install them in the Platform Layer. 

Install Citrix PVS Target Device in the layer.

Reboot the virtual machine.

Take a look at the Local groups.

Citrix VDA install created the following local groups:

  • Direct Access Users
  • Anonymous

And added users in few others:

  • NT Service\CitrixTelemetryService in Performance Log Users
  • NT Service\BrokerAgent in Performance Monitor Users

This configuration will not be captured in the layer. You need to create a domain GPO to applies the configuration.

Additionally you can also add few others:

  • NT AUTHORITY\Authenticated Users in Remote Desktop Users
  • <DOMAIN>\<CITRIX_ADMIN_GROUP> in Administrators
  • <DOMAIN>\<CITRIX_DA_USERS> in Direct Access Users

Note: NT Service accounts can only be added via Group Policy Preferences

See below an example of implementation via GPO.

Create Platform Layer - GPO for local group configuration
Create Platform Layer – GPO for local group configuration

Run Citrix Optimizer with the appropriate template

Run Citrix Optimizer with 2016 template
Run Citrix Optimizer with 2016 template

Once you are done with the optimizations, click on Shutdown For Finalize.

Create Platform Layer - Shutdown For Finalize
Create Platform Layer – Shutdown For Finalize

Go to ELM console > Layers > Platform Layer and right click on the Platform layer.

Select Finalize.

Create Platform Layer - Finalization
Create Platform Layer – Finalization

ELM will temporary upload the disk in: /mnt/repository/Unidesk/Finalize Disks/ during the finalization. Then it will move it to /mnt/repository/Unidesk/Layers/App/.

Create Platform Layer - Platform Layer Ready
Create Platform Layer – Platform Layer Ready

The layer is now Deployable in ELM.

Create Platform Layer - Layer Deployable
Create Platform Layer – Layer Deployable

Update Platform Layer

Go to ELM console > Layers > Platform Layers and select the Platform layer.

To update the Platform layer, right click and Add Version.

Platform Layer - Add version
Platform Layer – Add version

Increment the version number and add a description.

Platform Layer - Add version - Version Details
Platform Layer – Add version – Version Details

Select the OS Layer.

Platform Layer - Add version - OS details
Platform Layer – Add version – OS details

Select the connector where ELM will deploy the virtual machine.

Platform Layer - Add version - Select Connector
Platform Layer – Add version – Select Connector

Select Platform Types.

Platform Layer - Add version - Select Platform Types
Platform Layer – Add version – Select Platform Types

Enter the disk filename.

Platform Layer - Add version - Disk filename
Platform Layer – Add version – Disk filename

Confirm the creation.

Platform Layer - Add version - Confirm version creation
Platform Layer – Add version – Confirm version creation

ELM will prepare the OS Layer image.

Platform Layer - Add version - Creation in progress
Platform Layer – Add version – Creation in progress

After few minutes, ELM will start to create to deploy the virtual machines and its disks.

Platform Layer - Add version - Creating cache disks
Platform Layer – Add version – Creating cache disks

See below the virtual machine created in Hyper-V.

Platform Layer - Add version - Creating Virtual Machine
Platform Layer – Add version – Creating Virtual Machine

When everything is ready, ELM will automatically start the virtual machine.

Platform Layer - Add version - Virtual machine created
Platform Layer – Add version – Virtual machine created

The virtual machine is available. Logon and install updates.

Platform Layer - Add version - Virtual machine up and running
Platform Layer – Add version – Virtual machine up and running

Note: if a reboot is required during the updates, it is recommended to reboot a second time. 

Then click on Shutdown For Finalize (the icon is available on the desktop by default).

Platform Layer - Add version - Shutdown For Finalize
Platform Layer – Add version – Shutdown For Finalize

The virtual machine will shutdown.

Go to the ELM console > Layers > OS Layers and right click on the OS_2016 layer.

Platform Layer - Add version - Finalize version
Platform Layer – Add version – Finalize version

Select Finalize.

ELM will copy the disk from the share to the repository.
Location: /mnt/repository/Unidesk/Finalize Disks/.

Platform Layer - Add version - Creating disk in the repository
Platform Layer – Add version – Creating disk in the repository

Then ELM will copy it to the layer disk.

Platform Layer - Add version - Copying to layer disk
Platform Layer – Add version – Copying to layer disk

Location: /mnt/repository/Unidesk/Layers/App/.

Platform Layer - Add version - Copying to layer disk
Platform Layer – Add version – Copying to layer disk

The last step is remove the virtual machine in Hyper-V.

Platform Layer - Add version - Removing virtual machine
Platform Layer – Add version – Removing virtual machine

The new version of the layer has been deployed.

Platform Layer - Add version - Version created
Platform Layer – Add version – Version created

Export layer

Go to ELM console > Layers > Platform Layers and select Export.

You can export layers for backup or to transfer them to a different ELM infrastructure.

Platform Layer - Export
Platform Layer – Export

Select a network location and enter the proper credentials.

App layering - Export Layer - Destination
App layering – Export Layer – Destination

Select the item you want to export.

App layering - Export Layer - Select Layer/Version
App layering – Export Layer – Select Layer/Version

Select Finalize to export.

App layering - Export Layer - Confirm
App layering – Export Layer – Confirm

Take a look at the folder for the exported files.

App layering - Export Layer - Exported
App layering – Export Layer – Exported

Delete version of a OS layer

Right click on the OS layer and click on Delete Versions.

App layering - Delete Platform version
App layering – Delete Platform version

Select the version you want to delete. You can also delete the full layer with all its versions.

App layering - Delete Platform version - Select Version
App layering – Delete Platform version – Select Version

Click on Delete Versions to confirm.

App layering - Delete Platform version - Confirm
App layering – Delete Platform version – Confirm

Cancel a layer revision

Go to the layer task and click on Cancel to flush the current version of the layer.

App Layering - Cancel task
App Layering – Cancel task

ELM will flush everything for this version of the OS layer.

App Layering - Task canceled
App Layering – Task canceled

Import Layer

Go to ELM console > Layers > Platform Layers and select Import.

Specify the path and the credentials.

Platform Layer - Import
Platform Layer – Import

Select layer/version to import.

App layering - Import Layer - Select Layer/Version
App layering – Import Layer – Select Layer/Version

Confirm the import.

App layering - Import Layer - Confirm
App layering – Import Layer – Confirm

More from the Lab!