XenApp and XenDesktop

Tools

You can use the following tools and utilities to tailor, expedite, and monitor PvD operations.

Custom rules files

The custom rule files provided with PvD let you modify the default behavior of PvD image updates in the following ways:

  • The visibility of files on the PvD
  • How changes made to the files are merged
  • Whether the files are writable

For detailed instructions on the custom rules files and the CoW feature, refer to the comments in the files located in C:\ProgramData\Citrix\personal vDisk\Config on the machine where PvD is installed. The files named “custom_*” describe the rules and how to enable them.

Resize and poolstats scripts

Two scripts are provided to monitor and manage the size of PvDs; they are located in the Support\Tools\Scripts folder on the XenDesktop installation media. You can also use the PvD Image Update Monitoring Tool, which is located in the Support\Tools\Scripts\PvdTool folder.

Use resize-personalvdisk-pool.ps1 to increase the size of the PvDs in all of the desktops in a catalog. The following snap-ins or modules for your hypervisor must be installed on the machine running Studio:

  • XenServer requires XenServerPSSnapin
  • vCenter requires vSphere PowerCli
  • System Center Virtual Machine Manager requires the VMM console

Use personal-vdisk-poolstats.ps1 to check the status of image updates and to check the space for applications and user profiles in a group of PvDs. Run this script before updating an image to check whether any desktop is running out of space, which helps prevent failures during the update. The script requires that Windows Management Instrumentation (WMI-In) firewall is enabled on the PvD desktops. You can enable it on the master image or through GPO.

If an image update fails, the entry in the Update column gives the reason.

Reset the application area

If a desktop becomes damaged or corrupted (by installing a broken application or some other cause), you can revert the application area of the PvD to a factory-default (empty) state. The reset operation leaves user profile data intact.

To reset the application area of the PvD, use one of the following methods:

  • Log on to the user’s desktop as Administrator. Launch a command prompt, and run the command C:\Program Files\Citrix\Personal vDisk\bin\CtxPvD.exe -s Reset.
  • Locate the user’s desktop in Citrix Director. Click Reset Personal vDisk and then click OK.

Export and import a PvD inventory

The image update process is an integral part of rolling out new images to PvD desktops; it includes adjusting the existing Personal vDisk to work with the new base image. For deployments that use Machine Creations Services (MCS), you can export an inventory from an active VM to a network share, and then import it into a master image. A differential is calculated using this inventory in the master image. Although using the export/import inventory feature is not mandatory, it can improve the performance of the overall image update process.

To use the export/import inventory feature, you must be an administrator. If required, authenticate to the file share used for the export/import with “net use.” The user context must be able to access any file shares used for the export/import.

Export

  • To export an inventory, run the export command as an administrator on a machine containing a VDA with PvD enabled (minimum version 7.6):

    Ctxpvdsvc.exe exportinventory "\<path-to-export-location>"

    The software detects the current inventory’s location and exports the inventory to a folder named “ExportedPvdInventory” to the specified location. Here’s an excerpt from the command output:

     C:\Program Files\Citrix\personal vDisk\bin> .\CtxPvDSvc.exe exportinventory
     \share location\ExportedInventory
     Current inventory source location C:\CitrixPvD\Settings\Inventory\VER-LAS
     ...
     Exporting current inventory to location \ ... .
     ...
     Deleting any pre-existing inventory folder at \ ... .
     .Successfully exported current inventory to location \ ... . Error code = OPS
     <!--NeedCopy-->
    
  • To import a previously-exported inventory, run the import command as an administrator on the master image:

Import

Run the import command as an administrator on the master image.

Ctxpvdsvc.exe importinventory "\<path-to-exported-inventory>"

The <path to exported inventory> should be the full path to the inventory files, which is usually <network location\ExportedPvdInventory>.

The inventory is obtained from the import location (where it was previously exported using the exportinventory option) and imports the inventory to the inventory store on the master image. Here’s an excerpt of the command output:

C:\Program Files\Citrix\personal vDisk\bin> .\CtxPvDSvc.exe importinventory
\share location\ExportedInventory\ExportedPvdInventory
Importing inventory \share location\ExportedInventory\ExportedPvdInventory
…
Successfully added inventory \share location\ExportedInventory\ExportedPvdInventory to the
store at c:\ProgramData\Citrix\personal vDisk\InventoryStore
<!--NeedCopy-->

After the export, the network share should include the following filenames. After the import, the inventory store on the master image should include the same file names.

  • Components.DAT
  • files_rules
  • folders_rules
  • regkey_rules
  • RINGTHREE.DAT
  • S-1-5-18.DAT
  • SAM.DAT
  • SECURITY.DAT
  • SNAPSHOT.DAT
  • SOFTWARE.DAT
  • SYSTEM.CurrentControlSet.DAT
  • VDCATALOG.DAT
  • vDiskJournalData
Tools