One of the keys to a successful XenApp implementation is ensuring consistency across servers within the farm. Even a slight server misconfiguration can affect performance, functionality, and even stability. Troubleshooting these issues can become a time consuming process for Citrix administrators.  To minimize the chance of misconfiguration due to human error, Provisioning Services (PVS) is a recommended method for deploying XenApp servers, especially for large implementations. Management and administration of the farm becomes much easier when you only have to deal with a single vDisk versus individual servers in the farm.

Provisioning Services can be a challenging product to master. It was for me initially, but as with any product, the more you use it the easier it becomes. Some feedback that I have received from customers is that Citrix has a lot of information published on how to use PVS with XenDesktop, but not much content available on how to use PVS to deploy XenApp servers.  So the goal of this blog is to go over the procedure for those that are interested in using Provisioning Services to deploy XenApp 6.5 servers.  If you check out the eDocs article Preparing for XenApp Imaging and Provisioning, it mentions three different methods for deploying XenApp servers. I’m going to focus on the third method of capturing a XenApp image after XenApp has been installed, configured, and the server rebooted. This blog assumes that the reader has some familiarity with Provisioning Services and XenApp, so I won’t cover how to build and configure those servers. Please refer to Citrix eDocs if you need assistance with installing and configuring either product.

This method should be used to deploy XenApp Session-Only member servers. Do not use the first server in the farm or any farm servers that are also Zone Data Collectors or has the Licensing role installed. You will need the following software:

  • PVS Target Device x64 software (available on PVS media)
  • XenConvert x64 (latest version can be downloaded from http://MyCitrix.com)

A few prerequisites before starting:

  • Make sure the PVS servers have the proper firewall ports opened.  Please refer to the Communication ports used by Citrix Technologies under the Provisioning Services section for a listing of these ports.
  • Configure DHCP scope options 66 & 67, so when target device PXE boots it can receive the bootstrap file from PVS.
  • I also recommend reading the XenDesktop and XenApp Best Practices guide prior to beginning to ensure the XenApp farm and Provisioning Services are configured to Citrix best practices, and to plan for redirecting the Windows Pagefile, Event Logs, Citrix Logs, and antivirus pattern files to the Write Cache drive so those files persist after a server reboot.

Begin by building a XenApp “Master Image” server and join it to the XenApp farm. Build this server as a Session-Only server, and install and publish the applications to be delivered to the end users. After installing and publishing the applications, be sure to do the following:

  • Apply optimizations from the XenApp 6.x (Windows 2008 R2) Optimization Guide
  • Install .NET Framework 4.0 or higher (required for XenConvert 2.4.x)
  • Install XenConvert 2.4.1 x64 (do not run after installation)
  • Install the PVS Target Device x64 software from PVS 6.1 media. Note: Do not launch the Imaging Wizard at the end of the installation. You will be prompted to restart the computer. Perform a shutdown instead.

After the XenApp Master Image server is built and shut down, switch over to the PVS Service Console and create a new vDisk in the PVS store. The size of the vDisk should be large enough to contain the data on the XenApp Master Image server.

The next step I like to perform is to create a new Device Collection in PVS for the Master Image server. This is just my personal preference for keeping the Master Images devices separate from the XenApp devices that will be created later on. This is an optional step and not required.

The next step to perform is to create a target device in PVS for the XenApp Master Image server. Configure the target device to boot from Hard Disk in Maintenance mode. If you’re using dual NIC servers to isolate PVS streaming traffic, be sure to specify the MAC address of the NIC that will be used for streaming traffic. Assign the blank vDisk created earlier to the XenApp Master Image target device.

From the hypervisor host, change the boot order of the XenApp Master Image VM to boot from the Network Adapter first.

Boot the XenApp Master Image server back up. It should perform a PXE boot and retrieve bootstrap file from PVS. The server will proceed to boot into Windows as normal.  Login and make sure the Virtual Disk status in the System Tray shows activity.

 

Figure 1: Virtual disk should appear active.

In Windows Explorer you should also see an unformatted drive representing the vDisk. Create and add a new disk that will serve as the local Write Cache.

The next step I like to perform at this point is to shut the VM down and create two backup copies. The first copy is available just in case something goes wrong. It will save time in not having to rebuild everything.  The second copy will be converted into a VM template and stored in the hypervisor.  Remove the local C drive from the second copy before converting to a template.  The template should only have the Write Cache drive attached. Follow the method for creating a VM template based on the hypervisor you’re using.

Note: Best performance is achieved when the Write Cache is configured as the target device RAM. Since this option is expensive and not feasible for many implementations storing the Write Cache as local storage is the next best option.  In a production implementation a Write Cache size of 10-20 GB should suffice.

After creating the VM template, power the XenApp Master Image VM back on, and launch the Citrix XenApp Server Role Manager. Select the Edit Configuration link, and then select the Prepare this server for imaging and provisioning.

You will be presented the option of either removing the server from the farm, or leaving it. You’re also presented the option Clear database location settings from this server. You may decide to reuse the master image in different farms, or create an AD policy which supplies the database settings, in which case you may choose to select this setting.

 

Figure 2: Provisioning options

Hit Apply at the next Window to begin the “prep” process for the server. Once the process is done hit Finish to close.  Now we’re ready to create the XenApp vDisk for provisioning, which we will cover in part two of this blog.

Ed Duncan – Senior Consultant
Worldwide Consulting
Desktop & Apps Team
Virtual Desktop Handbook
Project Accelerator