Provisioning Services: Rolling Upgrade from 5.1 SP2 to 5.6 SP1

Posted on 2011/01/03


Well, it has been some time since I have posted a blog. A lot has been going on, but I thought this might be helpful for the community. I recently was meeting with a client that mentioned they did not want to use Citrix Provisioning Services (PVS) to deploy their XenApp servers because they were unable to upgrade the PVS farm from 5.1 SP2 to 5.6 SP1 without needing to shutdown all the target devices for the upgrade process. It seems most of the confusion came from the following statement in the Citrix documentation:

In a Provisioning Services farm, the database is upgraded at the same time that the first Provisioning Server is upgraded. After the database and the first server in the farm have been upgraded, the remaining servers within the farm can be upgraded.

Important: When upgrading a 5.0 or 5.1 Provisioning Services implementation, all servers in that farm must be upgraded before connecting to the upgraded database.

Being a huge fan of Provisioning Services, this information alarmed me a bit, so I contacted a friend who works with Citrix Engineering and got confirmation that a rolling upgrade is supported. Fortunately, that warning appears to be a bug in the documentation for PVS 5.6 SP1 and I believe is already fixed. Below you will find the steps we used successfully to upgrade our PVS farm from 5.1 SP2 to 5.6 SP1 without the need to shut down any target devices during the process.

1. Backup the PVS Database as a precaution.
2. Verify all vDisks have the high-availability property enabled and are available on at least two PVS servers in the farm. Target devices must have been rebooted after the high-availability option is set on the vDisk for this to be successful.
3. Select a time where the least number of target devices will be online in case something unexpected happens (like the target devices have not been rebooted since setting the HA vDisk property) and you have to recover.
4. Select a PVS server.
5. Stop the Stream Service on the selected PVS server.
6. Wait for all vDisks to failover to remaining PVS farm servers. This could take some time depending on how many images are currently being streamed, so be plan accordingly.
7. Uninstall the PVS 5.1 SP2 software.
8. Reboot the PVS server.
9. Install the PVS 5.6 SP1 software.
10. Run the Configuration Wizard which will upgrade the database if not previously upgraded and bring the server online.
11. Move a single target device to the new server to verify connectivity.
12. Repeat steps 2-9 for the remaining servers in the farm.

During my research, I also discovered a two other interesting facts that make the rolling upgrade work. First, the database is not locked unless a target device is booting, so be sure to perform the upgrade when new target devices are least likely to be added. Last, the database upgrade script is written in such a way that it can be run multiple times in case of failure without adversely affecting the database itself, so don’t worry if it executes multiple times.

Whether the database script succeeds or fails on the first server, it will still be run automatically after each of the remaining farm servers are upgraded. As long as it succeeds at least once during the server upgrades, the farm will be upgraded. If it fails on all the server upgrades, it can be run later by using the DBSCRIPT.EXE utility to generate the SQL script which can then be executed by a SQL Administrator directly on the database.

If you found this post helpful and would like to be notified of future blogs, please follow me on Twitter @pwilson98.

Advertisements