XenDesktop offers a powerful way to update all virtual desktops just by updating your shared base image.  Most of this functionality is provided via the Provisioning Server component of XenDesktop.  Some storage vendors offer significant storage savings for saving multiple copies of the base Provisioning Server vDisk image.  For background information on XenDesktop please refer to the XenDesktop Getting Started Guide or related documentation.

Listed below are the steps required to update a Provisioning Server vDisk image for use with XenDesktop.  This common vDisk image is shared across all virtual desktops in a XenDesktop desktop group.  Each virtual desktop OS image is identical when the virtual desktop is started.  During boot the virtual desktop is customized for that virtual desktop VM by changing items such as the hostname.  When the user logs in their profile is applied and they are authenticated to the XenApp for virtual desktops component that gives them access to their authorized applications.  The “writes” for each virtual desktop are stored in a separate write back cache for each virtual desktop.  This write back cache can be stored on the same storage device where the base vDisk image is located or on a virtual hard disk for each virtual desktop VM.

Since each virtual desktop boots using the same clean PVS vDisk how would you handle any needed updates such as patches?  The answer is to create a new version of the PVS vDisk that you will update and then assign that new vDisk to all the virtual desktops in the desktop group.

To accomplish this perform the following steps in the Provisioning Server (PVS) console in XenDesktop.

  1. Create a group for the client target devices in PVS and move target devices in the PVS group.  We created a group called “Sales”.  The PVS target devices will have been created by the XenDesktop Setup Tool.  Note this step is mostly for convenience.
  2. In the vDisk create a class name and a type name. In our case we used a classname of “SalesClass” and a type name of “SalesType”.  These names can be whatever you want but must match the names used in later steps.
  3. In one of the target devices in the PVS group set the class name as the name listed above. In our case the name is “SalesClass”.  Note that the client target devices do not have a type name.
  4. Copy and Paste the class name for all the other target devices in the PVS group.  Right-click on the target device and select Copy.  Be sure to only copy the class name as selecting and pasting other choices could cause problems.
  5. Make copy of the vDisk and rename it.  Put this vDisk in the same vDisk repository already configured.  This should be done from Windows Explorer and not the PVS console.
  6. Add the new vDisk in the PVS console by right clicking on the PVS host, selecting “New vdisk” and select “Existing” to add this new vDisk.
  7. In the copied vDisk set the class and type to the values used above.  In our case it was “SalesClass” and “SalesType”.
  8. Increment the build number in the new vDisk.  The build number is how PVS knows which vDisk is newer.
  9. Set the new vDisk to private image mode.  This is required to make changes to the vDisk.
  10. Assign a desktop VM (target device) to the new vDisk.  Be sure the new desktop VM is set to boot from virtual disk.
  11. Boot the desktop VM and make updates.  In this step you will make any updates you desire to the base image.
  12. Shutdown the desktop VM and set to standard mode.  We need to set the mode back to standard so it can be shared across multiple virtual desktops.
  13. In the PVS console enable “Check for new versions of a virtual disk” in the PVS host “Options” tab.  This will require the PVS streaming service to be restarted.  This step only needs to be done once as this is set for each PVS host.
  14. In the old and new vDisk check “Enable automatic updates” in the Disk Mode tab.  This step only needs to be done once per vDisk.
  15. To check for an update immediately, right click on PVS host and select “Check for disk updates” followed by “Check for updated virtual disks”.
  16. When the virtual desktop VMs boot they will be assigned the new vDisk.  When users log off their virtual desktop, the virtual desktop VM will be restarted and will pull down the new updated vDisk image.

These are all the steps to update your base image.  Some storage vendors offer functionality to improve upon storage utilization and also allow for faster cloning.  For example data deduplication can be used on the vDisk repository so that only the differences between different version of the base vDisk images are stored.  Some storage vendors such as NetApp will soon allow for file level cloning which will be more effective for quickly cloning a base vDisk image.  So when you create a file copy it would be nearly instantaneous and use almost no additional storage.  This differs from data deduplication because in this case each block in the base vDisk image would first need to be copied and you will need to take time and hard disk throughput to perform the data deduplication to get the storage savings.

For additional information please refer to the new XenDesktop CDN site.