Contact Support

Customers who viewed this article also viewed

banner icon

Identify Changes in NetScaler build files with

File Integrity Monitoring

Learn More Watch Video
CTX226105 {{tooltipText}}

Citrix App Layering: Compress Layer Utility

Applicable Products

  • Citrix App Layering

Introduction

When layers are created in Unidesk 2.x files are written into the vmdk at the block level. The vmdk being written to is a “Thin” disk but deleted blocks are not freed up before saving the layer. This means that the layer sizer is greater then the actual size of the files required to run the application.

This utility provides a mechanism to remove the deleted blocks from the vmdk before the layer is finalized for an OS or App layer. This is particularly important for OS layer versions created by Windows 10 when performing a major update like the Anniversary Update (1607) because during that process an entirely new operating System is installed. In general when using the utility it seems to save about one third the file size of the layer.

The utility also provides the ability to compress UEP disks from selected desktops. 

Requirements

In order to use this utility there are several important requirements to be aware of:

  • The utility must be run on a virtual machine in the same vCenter as Unidesk is installed.
    • Windows 7 or Windows Server 2012 or later. 
    • The VM Name and Windows system name must be the same The VM Name and Windows system name must be the same system name must be the same
    • Can be a full clone or Unidesk VM. 
  • The utility must be run by a local administrator on that machine. 
  • The utility uses VMware PowerCLI to manipulate the disk attachments on the console machine and to start and stop the Install Machines. The utility has been tested with PowerCLI 5.5 Update 2 through PowerCLI 6.5 R1. It should work with any version post 5.5 Update 2. 
  • The Utility must be run as a vCenter Administrator or using the Unidesk Service Account.
  • The utility must be configured with the root account for a host in the vCenter that has access to the same datastores as the Unidesk MCP. This access is used to run the vmkfstools and du commands. The host must also allow ssh through its firewall and have ssh running. 

Installing

Download the Zip file then edit its properties and unblock the zip. This will unblock the include scripts and executables.

Extract the zip to a folder off the root with no spaces. We recommend “c:\compress”.

Always run the application “As Administrator”.

Click Setup and fill out each section. Remember to click each save after entering the correct information. 

file

Using the Utility

The utility allows you to compress either App and OS layers or Desktop UEP Layers.

Compress Layers

The utility is very simple to use. It is intended to perform the compression at the end of the layer creation process right before finalize. Create your Installation Machine. Install the software as you always would and when you are ready to finalize:

  • Run this utility C
  • Click on “Get Installs” 
  • Click on the Installation you want to Compress and Finalize 
  • Click on “Compress layer” The utility will perform the compression and finalize the layer for you. If you want to compress an existing layer just add a version to it, let the Installation Machine come up, then perform the same process. 
file

Compress UEPs

This utility can be used to compress the desktop personalization layer disks for persistent desktops. If you use this functionality you will be rebasing any desktop backups you have because a disk can’t be compacted if it has a snapshot. The overall process is as follows: 

file
  • Run this utility 
  • Click on “Get Desktops” 
    • The utility will query the MA for a list of persistent desktops and their owners.
  • Select desktops and “Add to Desktop List” 
    • The desktop list can be searched and filtered using the Narrow Desktop List interface. 
  • Once a list of desktops is chosen click Compress UEPs to process 
    • Note: Desktops must be shutdown and in maintenance mode
    • If desktops have backups they will be skipped unless you manually disable the backups or check the remove Snapshots checkbox. 
  • Start up your desktops using Unidesk when complete.
  • Results are contained din the log.

As the utility runs you see progress in the PowerShell window. 

file

Important Considerations

  • Powered on desktops are skipped. 
  • If the desktops are powered on by a broker during the process it will fail. Ensure this won’t happen by using maintenance mode in your broker.
  • Desktops with Snapshots are skipped unless the “Remove Snapshots” checkbox is checked. 

Log Files

As the script runs it keeps a log file for each layer or desktop it processes. The logs are stored in the Logs folder. To view the logs click on “Open Log Folder”.

Logs for compressing layers are named using the layer name. Logs for compressing the UEP disks start with UEP.

The logs will show the process and results of the compression including a before and after size for each disk. 

A layer log will look like this: 

file

The UEP compression results look like this: 

file