BACKGROUND IMAGE: iSTOCK/GETTY IMAGES
Citrix XenDesktop's support for GPU virtualization allows virtual desktop administrators to run more graphics-heavy applications with better performance.
Citrix added the capability for XenServer 6.2 SP1 to virtualize the Nvidia GRID K1 and K2 graphics processing unit (GPU) boards. These virtual GPUs (vGPUs) are accessible by the XenDesktop 7.1 desktop and server OS.
Graphics applications have historically been a major impediment to virtual desktop adoption. Computer-aided design (CAD) software like CATIA and AutoCAD, for example, can take a Citrix XenDesktop VM and even its host server to their limits. As a result, Citrix administrators have had to tune down the quality of the graphics data in these types of applications. This translates to an inferior experience for the end user. Nvidia's GRID vGPU technology puts these scenarios back into the possible column for virtual desktops.
It has also become common practice for administrators to disable the eye-candy elements of Windows. These range from displaying thumbnails in Explorer; menu fade-in, fade-out effects; Aero glass, or transparency, effects on the taskbar and windows; and things like Aero peek, which displays a thumbnail of a running application. With a vGPU available, which can be as little as one-eighth of a K1 board's four GPUs, the user gets enough of a boost to make this kind of tuning less critical. The end result is a virtual desktop that is much more on par with the physical desktop in look and feel.
Installing the GRID vGPU feature
Nvidia certifies the GRID cards on a relatively small set of servers, and the GRID vGPU feature is available only on the XenServer hypervisor -- specifically XenServer 6.2 with SP1 applied. Once the GRID cards have been physically installed in the XenServer host, the Nvidia vGPU GRID Manager driver (available on the Nvidia website) needs to be installed next. This provides XenServer with a paravirtualized driver for the GPU.
In XenCenter, XenServer's GUI management console, the GPU tab will display the available GPUs (Figure 1).
To share or not to share
Citrix gives the administrator the flexibility to use a full GPU for workloads that require the best performance or to portion up the GPU into shareable vGPUs.
There are a few options that can be set on the server level:
Placement policy. This determines how each GPU will be assigned by the server to virtual machines (VMs). The choice is whether to keep as many vGPUs together as possible on the same GPU (maximum density) or to keep vGPUs on separate GPUs when possible (maximum performance).
Allowed vGPU types. A GRID GPU has several types available to the VM.
- Pass-through whole GPU: Provides the best performance with no sharing of the GPU
- GRID K260Q: Two users per GPU, 1920 MB of video memory allowing as many as four displays at 2560x1600 resolution
- GRID K240Q: Four users per GPU, 960 MB of video memory allowing as many as two displays at 2560x1600 resolution
- GRID K200: Eight users per GPU, 256 MB of video memory allowing up to two displays at 1920x1200 resolution
An administrator can restrict the types of vGPUs that the system can use. Note that for server OS-based XenDesktop VMs (aka XenApp), only the GPU pass-through type is supported.
Creating the master image and configuring XenDesktop
In XenServer, a master-image VM is created for use by XenDesktop to create or provision new desktops. You can assign a GPU from the allowed list to the VM (Figure 2).
Remember, for Windows to recognize the GPU, the Nvidia GRID display driver for the OS needs to be installed (Figure 3). The XenDesktop Virtual Delivery Agent (VDA) is also installed on the VM. You should enable the HDX 3-D Pro option to allow the HDX protocol to recognize the availability of the GPU.
Finally, you need to configure XenDesktop to support the GPU. XenDesktop will need a Connection and Resource record for the new vGPU-enabled XenServer. When you create this record, XenDesktop asks whether you want to use graphics virtualization, and you can set the type of vGPU desired. This should match what the vGPU was set to when you created the master VM (Figure 4).
The normal process of creating a XenDesktop Machine Catalog and Delivery Group then takes place. XenDesktop validates that the Machine Catalog can use the master image VM that you created earlier by matching GPU types in the Connection and Resource record.
Allowing an expensive GPU to be shared allows XenDesktop to be a more palatable solution for even the highest-performance use cases. Plus, you can quickly adjust a desktop VM configuration, adding appropriate levels of CPU, RAM and graphics capability to match the job.