Migrating PvD to App Layering

Citrix is replacing Personal vDisk (PvD) functionality with Citrix App Layering technology. Use the information in this article to create an App Layering VM that is functionally equivalent to a PvD-based VM.

For information about layers, and the process of creating and publishing image templates, see the Citrix App Layering documentation.

Typical PvD VMs consist of a shared image and a Personal vDisk. The shared image is distributed among multiple users, each of whom has their own user-specific Personal vDisk. A typical App Layering VM consists of multiple layers, including an OS, platform, and usually one or more application layers. This VM is shared by multiple users, each of whom has their own User Layer.

When migrating a set of users who share a PvD image VM, a functionally equivalent App Layering Shared Image VM is created. Each user has their personal profile and settings migrated from their Personal vDisk to their new App Layering User Layer, as illustrated in the following image:

PvD to App Layering migration

This article takes a different approach for migrating a user’s personal data versus migrating applications. For personal data, this article recommends tools for copying it from a Personal vDisk to a User Layer. For applications, it does not recommend copying them. Instead it recommends personal data be reinstalled in an App Layer. Also, this article assumes:

  • that the PvD VM is running Windows 7. Migration for other OS versions should be similar if App Layering supports them. For example, App Layering does not support Windows XP.
  • XenServer is used as the hypervisor, and that you are familiar with managing it using XenCenter.
  • Machine Catalog Services (MCS) or Citrix Provisioning (formerly Provisioning Services) are used for provisioning purposes. For MCS or Citrix Provisioning, you need the Citrix Virtual Apps and Desktops ISO. For Citrix Provisioning, you need the “ProvisioningServicesxxx.iso.”
  • Citrix Virtual Desktops is used to manage the generated App Layering VMs.

If you are using a different hypervisor or provisioning service, the migration procedures noted in this article are similar.

The examples in this article assume that the user is a member of an Active Directory (AD) domain.

PvD versus App Layering

App Layering encourages the clean separation of applications from user-specific information. Applications are located in App Layers, often with one app per Layer, and user-specific information is located in a User Layer. As a best practice, a user would not install an application in their User Layer if they thought the application might have general utility. Instead they would install it in an Elastic App Layer, which would be dynamically attached to their (and others) VMs when they log in.

PvD does not support this clean separation because it has only two layers: the Shared Image, shared by multiple users, and a user-specific vDisk. Users would often install an application in their user vDisk if it was not available in the Shared Image.

When migrating a Shared PvD Image to App Layering you must determine all the applications it contains. For each application (or related set of applications) you create an App Layer. Consider the following:

  • If the application has general utility, you attach the App Layer to an Image Template, which is then published in a Layered Image.
  • If the application has utility to some smaller group of users, you assign it to that group. Then when members of that group log into the VM, it is dynamically attached as an Elastic App Layer.
  • If the application has specific value to only one user, you install it in the user’s User Layer.

Miscellaneous App Layering artifacts

In the process of creating an App Layering VM, some artifacts are created, including packaging VMs, connectors, agents, and VM templates. These elements are unique to App Layering and are described briefly in the following sections. For a complete description, please see the App Layering documentation.

Packaging VMs

App Layering’s method for customizing the content of Platform Layers and App Layers is to create a Packaging VM, sometimes referred to as Install Machines. Creating a layer is a six step process:

  1. From the Enterprise Layer Manager (ELM) you create the layer and specify its name and other information.
  2. ELM generates a Packaging VM and copies it (typically) to your hypervisor.
  3. From your hypervisor you boot the Packaging VM and customize it.
  4. When you’re finished customizing, click the Shutdown to Finalize icon, which is on the Packaging VM desktop. This action performs a layer integrity check, ensuring that no reboots are pending and that ngen is not running. It does not finish until all such tasks are complete.
  5. From ELM, click the Finalize action.
  6. ELM finishes generating the layer based on your customized Packaging VM and deletes the Packaging VM.

App Layering does not use a Packaging VM to create the OS Layer. Instead, you create a VM, customize it as needed, and the ELM imports it.

Connectors and agents

The ELM communicates with several other entities, such as hypervisors, file shares, and provisioning tools. It performs various tasks on those entities, such as creating VMs, and involves copying various kinds of data, such as VHDs and files, to or from those entities.

A connector is an object that ELM uses when communicating with some other entity to perform a set of tasks. It is configured with the name, or IP address, of the other entity, the credentials needed to access that entity and any other information required to perform its tasks. For example, a file path on the entity where data is read or written.

The following elements create connectors:

  • XenServer Connector: ELM uses this connector to create or delete VMs, such as the Packaging VMs, from XenServer.
  • Network File Share Connector: This connector is configured from the ‘System’ tab, ‘Settings and Configurations’ subtab, in the ‘Network File Share’ section. ELM and VMs use this process to create files in a network file share.
  • Citrix MCS for XenServer Connector: If you are using MCS as your provisioning service, this connector is created. ELM uses it to copy Layered Images to XenServer after stripping out drivers not required by MCS.
  • Citrix Provisioning Connector: If you are using Citrix Provisioning as your provisioning service, you create this connector. ELM uses it to copy the Layered Image VHD to the Citrix Provisioning Server. It creates a vDisk there after stripping out drivers not required by Citrix Provisioning.

VM template

If you are using XenServer as your hypervisor, a VM Template is created based on your OS Layer VM. This template contains information about the OS, such as network interfaces and the number of processors. It is created after your OS Layer is created. It is used when a XenServer connector is created.

Installing the Unidesk Agent on the Citrix Provisioning Server

If you are deploying using Citrix Provisioning, you must install the Unidesk Agent on the Citrix Provisioning Server. This lets ELM run commands on the Citrix Provisioning Server.

See “Install the App Layering Agent (required for Citrix Provisioning and Connector Scripts)” in the App Layering documentation.

Shared image migration

To migrate a Shared PvD Image to App Layering, you create a Shared Layered Image that is functionally equivalent to the Shared PvD Image. The Shared Layered Image is constructed by publishing an Image Template. The Image Template combines an OS Layer, a Platform Layer and one or more App Layers, each of which you create. These procedures are described in the following sections.

OS layer

Use the following steps to create an OS Layer.

From XenCenter:

Create a VM on XenServer. This is the basis for both your OS Layer and your VM Template.

The VM’s OS version should match that of the Shared PvD Image that you’re migrating. In these instructions we assume you are running Windows 7.

From the OS Layer VM:

Log in using the local admin account.

Install any outstanding Windows Updates.

Perform the preparation activities described in the App Layering documentation, “Prepare a Windows 7 image.”

From XenCenter:

Make a copy of your OS Layer VM. Delete any local storage. Convert the VM to a Template. You use this VM Template when creating a XenServer connector.

From ELM:

From the Layers tab, click Create OS Layer.

If you are using XenServer and have not yet created a XenServer connector, do so now. When prompted for the ‘Virtual Machine Template’, specify the VM Template you created in the preceding section.

When prompted to ‘Select Virtual Machine’, pick your OS Layer VM.

After assigning an Icon and specifying any other detailed information, press ‘Create Layer’. This copies your OS Layer VM into the ELM store and generate your OS Layer.

This completes the creation of your OS Layer, making it deployable.

Platform layer

Once the OS Layer is generated, you can proceed with creating a Platform Layer for the Shared Image.

One step in customizing the Platform Layer is to join the users’ Active Directory domain. If the users are members of several different domains, you must create a separate Platform Layer for each domain. This article assumes all the users are members of a single domain.

From ELM:

  1. In the Layers tab, click Create Platform Layer.
  2. In the ‘OS Layers’ panel select the OS Layer you created in the preceding section.
  3. In the ‘Connector’ panel select the XenServer Connector you created in the preceding section. ELM uses this information when writing the Platform Layer Packaging VM to XenServer.
  4. In the ‘Platform Types’ panel select ‘This platform will be used for publishing Layered Images’.
  5. Pick the appropriate Hypervisor. In this article we assume you are using ‘Citrix XenServer’.
  6. Pick the appropriate Provisioning Service. We assume you are using either ‘Citrix MCS’ or ‘Citrix PVS’ (if using Citrix Provisioning).
  7. For Connection Broker, select ‘Citrix XenDesktop’.

After assigning an icon and specifying any other detailed information, click Create Layer. This action generates a Platform Layer Packaging VM. Once complete, the creation task’s status indicates ‘Action Required.’

From XenCenter:

When your Platform Layer Packaging VM is generated, it appears in XenCenter. Perform the following:

  1. Boot it.
  2. From your Platform Layer Packaging VM, log in using the local admin account.
  3. If prompted, reboot, and log in again.
  4. Join the users’ Active Directory domain in the usual way. That is, Control Panel > System > Change Settings \ > Change. Reboot and log in again using the local admin account.

Install the Citrix Virtual Delivery Agent (VDA):

  1. Mount the Citrix Virtual Apps and Desktops ISO.
  2. Run AutoSelect.exe if it doesn’t start automatically.
  3. Click Start beside Citrix Virtual Desktops.
  4. Click Virtual Delivery Agent for Desktop OS.

    In general, pick the defaults in the option panels that follow. However,

    • You can specify your Delivery Controller when prompted, or specify ‘Do It Later (Advanced)’.
    • Ensure that ‘Personal vDisk’ is not selected.

    After the VDA is installed the Platform Layer Packaging VM reboots.

Log in again.

If you are using Citrix Provisioning as your provisioning service, you also need to install the Target Device software. To do this:

  1. Mount the ‘ProvisionServicesxxx.iso’.
  2. Run ‘AutoSelect.exe’ if it doesn’t start automatically.
  3. Click ‘Target Device Installation’.
  4. Click ‘Target Device Installation’ again to start the Installation Wizard. The installer installs the Citrix Diagnostic Facility (CDF) and the Citrix Provisioning Service Target Device code.
  5. In general you pick the defaults in the option panels that follow.
  6. When the Installation Wizard finishes uncheck ‘Launch Imaging Wizard’ and click ‘Finish’.
  7. Allow the VM to restart and log in.
  8. Run the Citrix Provisioning Optimizer utility.

After installing all platform-related software and making any customizations, click the ‘Shutdown to Finalize’ desktop icon.

From ELM:

Select your Platform Layer’s icon, its status should be ‘Editing’, and click Finalize.

App layers

Once the Platform Layer is generated, you can proceed with creating App Layers from the Shared PvD Image. Determine the applications installed in the Shared PvD Image. There are several ways to do this, including:

  • If you have a bootable version of the Shared PvD Image, boot it and, from the control panel select ‘Programs and Features’.
  • Otherwise from Citrix Virtual Desktops, use the Shared PvD Image to create a PvD VM for a dummy user. Because the dummy user’s Personal vDisk is empty, all the applications shown by ‘Programs and Features’ have been installed on the Shared PvD Image.

Use the Programs and Features panel to verify all the required applications.

Alternatively you can use the PCmover program, described in the Migration Tools section. It does a good job of identifying applications on a computer. It detects programs that have been installed in some ad-hoc manner, so they don’t appear in ‘Programs and Features’. If used for this purpose, allow it to perform its analysis without actually performing any transfers. Once it has performed its analysis and you have noted all of the Shared Image’s applications, you would simply cancel of PCmover. For details, see the section Using PCmover to Determine Required Applications later in this article.

Tip:

If you are migrating several PvD VMs, this would be a good opportunity to boot each to compile a list of user-installed applications. Any applications that you find over and above the ones you found in the Shared Image are user-installed applications.

Once you have a complete list of required applications, create one or more App Layers, installing one or more of the required applications in each App Layer. For example, related applications might all be installed in one App Layer. Applications used by several users might be installed in an Elastic App Layer. An application used by a single user might be installed in their User Layer. Although for many applications it is straight forward to create an App Layer, others require special preparation.

For many applications it is straightforward to create an App Layer, others require special preparation. Check the various configuration recipes developed by Citrix Solution Architects and by the App Layering community. You find, for example, that there are some applications that can only be installed in a User Layer and not in an App Layer.

For each App Layer, from ELM:

  1. In the Layers tab, click Create App Layer.
  2. In the Layer Details section, specify the Layer Name and Version.
  3. In the OS Layer pick the OS Layer you created in the preceding section.
  4. If this application depends applications in another App Layer, specify them in the Prerequisite Layers. This determines the order in which you create your App Layers.
  5. In the Connector, pick the XenServer Connector you created in the preceding section. ELM uses this connector to write the App Layer Packaging VM to XenServer where, using XenCenter, you can boot and customize it.
  6. When all options have been specified, click Create Layer. This generates an App Layer Packaging VM. When this is complete the creation task’s status indicates ‘Action Required.’ In this example no Platform Layer is needed because we assume this App Layer is deployed on the same hypervisor as was chosen when you created the OS Layer.

From XenCenter:

When your App Layer Packaging VM is generated, it appears in XenCenter. Perform the following tasks:

  1. Boot it.
  2. From your App Layer Packaging VM, log in using the local admin account.
  3. If it immediately requires a reboot, do that and log in again.
  4. Install this App Layer’s applications and make any necessary customizations. Because this Layer is shared by multiple users, user-specific customization and settings should not be made. They are performed when a user’s Personal vDisk is migrated, as described later in this article.
  5. After installing this layer’s applications and making any customizations, click the Shutdown to Finalize desktop icon.

From ELM:

  1. Select the App Layer’s icon; its status should be Editing.
  2. Click Finalize. This completes the creation of this App Layer, making it deployable.
  3. Repeat this procedure for each required App Layer.

Image template

Having generated your OS Layer, Platform Layer and one or more App Layers, you can now proceed with creating an Image Template. Decide which App Layers should be bound into the Layered Image and which should be dynamically assigned to users as Elastic App Layers. Consider:

  • Any App Layers that you include in the Image Template are available to all users of the Shared Layered Image.
  • Any App Layers that you assign to specific users (or AD groups) are available only to those users (or AD groups). You have the flexibility of changing such assignments later, making App Layers available to different users or groups.

Important:

These two alternatives are mutually exclusive; you should never include an App Layer in an Image Template and also assign it to a user. Doing so is unnecessary and not supported.

As a rule of thumb, applications that were installed in the Shared PvD Image should be included in the Image Template. Applications that were installed in some user’s Personal vDisk should be assigned as Elastic App Layers, and applications used by a single user and unlikely to be shared are installed in that user’s User Layer.

From ELM:

  1. In the Images tab, click Create Template.
  2. Provide a name and version.
  3. Specify the OS Layer created in the preceding section.
  4. Select any App Layers that you want included in the Image Template. Do not select App Layers that you intend to assign to users and AD groups as Elastic App Layers.
  5. Select a Connector Configuration. This determines where the Shared Image is deployed when it is published. Create a Connector Configuration the first time you use a new deployment target.

Assuming you are using XenServer, you have three types of deployment available:

  • XenServer: Using the XenServer connector, ELM deploys the published Shared Image as a VM to XenServer where, using XenCenter, you can boot it. Typically, though, choose one of the following two choices, Citrix Provisioning or MCS.
  • Citrix Provisioning: The published Shared Image is deployed as a vDisk on a Citrix Provisioning Server. When creating a Connector Configuration of this type you must specify the name of the Citrix Provisioning Server. Login credentials for a user with permission to manage Citrix Provisioning. For details see “Connector Configuration & Optional Script (Citrix Provisioning)” in the online App Layering documentation.
  • Citrix MCS for XenServer: The published Shared Image is deployed as a VM on XenServer where, using Citrix Virtual Desktops, you can use it to create a Machine Catalog.

When creating this type of Connector Configuration you must specify the XenServer address and credentials so ELM can write there, and the target Storage Repository. Also specify the VM Template you created in the preceding section.

In addition:

  • Select a Platform Layer: either the MCS or Citrix Provisioning platform layer that you created in the preceding section or, if you are deploying to XenServer, skip this option.
  • In the Layered Image Disk panel: If the `SysPrep’ option appears, select ‘Not Generalized’.
  • For ‘Elastic Layering’: select ‘Application and User Layers’. This setting has two effects.
    • It allows extra App Layers to be assigned to users and AD groups, layers that are dynamically attached when a user logs in.
    • It causes a new User Layer to be created on behalf of a user the first time they log in. (In App Layering version 4.1 this option is only available if explicitly enabled. To enable, from ELM in the ‘System’ tab in the ‘Settings and Configuration’ subtab, in the ‘Labs’ section, select the ‘User Layers’ checkbox.)

A User Layer captures the user’s profile, settings, documents, etc. As described in the following section, this is the target where the Migration Tools transfer all user-specific information from the user’s Personal vDisk.

In the Confirm and Complete panel, click Create Template. This should complete almost immediately.

Publishing the shared layered image

The final step in generating the Shared Layered Image is to select the Image Template created above and click Publish Layered Image.

When this completes the resulting Layered Image is deployed as either (1) for MCS, a VM in XenServer, or (2) for Citrix Provisioning, a vDisk in the Citrix Provisioning server.

Now you can use the normal MCS or Citrix Provisioning management tools to create a Citrix Virtual Desktops machine catalog and Delivery Group:

  • For MCS, use Studio to create a machine catalog and import the Shared Layered Image VM.
  • For Citrix Provisioning, use the Citrix Virtual Desktops Setup Wizard to create a machine catalog in Studio.

The final step in migrating a user’s PvD VM to App Layering is described in the following section. As a preview of the process: you concurrently run the original PvD VM and the new App Layering VM, log in as the user to the App Layering VM, and execute a migration tool to transfer the user’s profile and settings from PvD to the App Layering User Layer.

Migration tools

Citrix recommends that you use one of two tools, PCmover or USMT, to migrate personal information from a user’s Personal vDisk to their App Layering User Layer.

  • PCmover is a program sold by LapLink.com. You can run a user’s PvD VM and the App Layering VM, and use PCmover to transfer the user’s settings from the former to the latter. The two VMs can either be run concurrently with the information being transferred over a network, or they can be run consecutively with the information transferred by a file.

    PCmover has an easy-to-use GUI, with which you can precisely tailor the information being transferred. If you have several PvD VMs to migrate, you should consider using the PCmover Policy Manager to create a Policy File. Using a Policy File, you can perform migrations with minimal interactions.

    For details see the PCmover User Guide.

  • USMT is a set of programs available from Microsoft as part of the Windows Automation Installation kit (AIK). A scanstate program is run on the PvD VM to write a transfer file. A loadstate program is run on the App Layering VM to read and apply the transfer file. The details of what information is transferred are determined by several XML files. Those files can be edited if the defaults do not suit your needs.

In this article we assume you run PCmover.

Migrating user information

At this point you should have taken your original Shared PvD Image and created a functionally equivalent App Layering Shared Layered Image. You have one or more user PvD VMs, each with a Personal vDisk containing user profile and other information that you want to migrate to an App Layering User Layer.

For each such user you start the user’s PvD VM, start the Shared Layered Image, and, on both VMs, log in using the user’s domain credentials and run PCmover.

To migrate user information:

  1. Install PCmover in a share accessible from both the PvD VM and the Shared Layered Image.
  2. From Studio, start the user’s PvD VM. Log in as the user. Disable firewalls.
  3. From ELM, assign to the user any Elastic App Layers they require.
  4. Ensure that the user has write access to the directory where their User Layer exists. Look for ‘Configure Security on User Layer Folders’ in the online documentation.
  5. From Studio, start the Shared Layered Image VM. Log in as the user. The first time the user logs in, the VM creates a User Layer in the Network File Share. Disable firewalls, anti-virus, and anti-spyware applications.
  6. Run PCmover on the PvD VM.
    1. Select ‘PC to PC Transfer’ and ‘Next’.
    2. Select ‘Old’ and ‘Next’.
    3. Select ‘Wifi or Wired Network’ and ‘Next’.
    4. PCmover spends a few minutes scanning the PvD VM. After that select ‘Next’.
    5. Assuming you do not want to receive an email notification when the transfer is complete, simply select ‘Next’.
    6. Enter a password or not. A password ensures that the user information is sent from the PvD VM to only the Shared Layered Image VM and to no other VM. Then select ‘Next’.
  7. Run PCmover on the App Layering VM.
    1. Select ‘PC to PC Transfer’ and ‘Next’.
    2. Select ‘New’ and ‘Next’.
    3. Enter the required Serial Number Validation values.
    4. For ‘Network Name’ specify the name of the PvD VM and ‘Next’
    5. Visit the ‘Application Selections’ panel. We recommend deselecting all applications. You should have created App Layers for all the required applications.
    6. Visit the ‘User Account Selections’ panel. We recommend editing any users other than the Personal vDisk’s owner and marking them as ‘Do not transfer this user’.
    7. Visit the ‘Custom Settings’ panel. We recommend selecting ‘Files and Settings Only’.
    8. Visit the ‘Drive Selections’ panel. We recommend editing any drives other than ‘C:’ and marking them as ‘Do not transfer this drive’.
    9. After visiting all the panels, click ‘Next’.
    10. Assuming you do not want to receive an email notification when the transfer is complete, simply select ‘Next’.

At this point PCmover starts transferring files and settings from the PvD VM to the user’s App Layering User Layer.

Using PCmover to determine required applications

You can use PCmover to analyze a PvD VM and determine the installed applications. This provides an alternative to using the Control Panel’s ‘Programs and Features’.

  1. Run PCmover on the PvD VM.
  2. Select ‘PC to PC Transfer’ and ‘Next’.
  3. Select ‘Old’ and ‘Next’.
  4. Select ‘File Storage Device’ and ‘Next’.
  5. Visit the ‘Application Selections’ panel and note the installed applications.
  6. Cancel PCmover.