Upgrading Provisioning Server

So you have a working PVS deployment, but it’s not the newest version.  How do you go about upgrading this?  It seems a daunting task.  I mean, if you blow it up, none of your provisioned XenApp or XenDesktop VMs will function anymore, right?  And that would be bad, right?  So what’s a guy to do??  It’s easy, really.  No, seriously, it is.

First thing, we are going to assume that you built to best practices, and you have MORE THAN ONE provisioning server.  Make sure all your targets are using only one of the two servers.  Then, uninstall PVS from the one that’s not being used.  Then install the new version.  Tell it to join an existing deployment, answer the couple of simple questions, and it’s good again.  All the images should still be on the box, so you’re good there also, AND, it’ll even remember the bootstrap info (you are using the PXE service instead of DHCP 66 & 67, right?  If not, SHAME ON YOU!).  Then, fail all the targets over to that one, and then repeat the process on the remaining server(s).

Now, some of you are sitting there saying “Yeah, I’ve done that.  I have v6.1 PVS servers, but all my target devices are still running the v5.6 target software.”  Common.  So how to address that issue?  Again, easy.  Pretty time consuming, but easy.

We are going to assume the worst-case scenario, which is that you do NOT have a *current* VM with all the applications and software installed that you can just uninstall v5.6 and install v6.1 and take a new image.  For whatever reason, either that source VM has been deleted, or it’s so far away from current that it’s not worth the trouble to make all the changes to get it to be like the current image.  What to do?

  • Make a COPY of the vDisk for the image you want to upgrade. 
  • Mount the image in PVS. 
  • Use the wizard in PVS to deploy a new target device. 
  • Assign it the vDisk that you just made a copy of. 
  • Set the vDisk to PRIVATE mode.
  • Boot the VM. 
  • AFTER the VM is booted, hot-add a virtual disk to that VM that is at least as large as your image size.  So, your VM thinks the image is 40GB (it might be only 20GB on disk, but you did take a dynamic image, right?), so you have to add a 40GB virtual disk. 
  • Launch disk mangler, create a partition, format it and assign it a drive letter.  MARK IT AS ACTIVE!! (PRO TIP to follow about how to handle if you forgot to do this)
  • Browse your way to C:\Program Files\Citrix\Provisioning Services and run BNimage.exe.  You get a single window that pops up, and it asks you for the path you want to push the image into. 
  • Point it at your new, empty drive, and let it run.  It’ll reboot a few times during the process.  You must log back into the VM each time in order for the process to continue.  Do NOT make any changes to the PVS target until it tells you it’s finished!! 
  • After it’s finished (and you see a message telling you so), go into PVS and change the target to Boot From Hard Disk, and remove the vDisk image from it (so now there are no vDisks assigned to the target). 
  • Power the VM down, go into the VM settings and remove your local cache disk (you are caching to local disk, right?  If not, you’d better be caching in RAM!  If you’re using “Cache to server”, go read some other blog, even I can’t help you.) 
  • After you’ve removed the local cache disk, power the VM back on.  You’ll get a message from the PXE service that there is no disk asigned.  Press any key, and it should boot from the local disk now.  Oh, you get a message about no operating system?  One of two things has happened (both of which you were supposed to do if you were following my instructions!):  Either you didn’t mark the partition as active, or you didn’t remove the cache disk.  Here’s the PRO TIP I promised:  Add the local cache disk back to the VM (if you deleted it already, which you should have – just copy one from another VM that’s not powered on and then “add an existing vDisk”), then add the original private mode vDisk back to the target in PVS.  Set it to boot from the vDisk.  After it comes up, go mark the partition as active, then power it down and remove everything as I outlined above.
  • The VM now boots like a regular VM – it loads the image from the local vDisk in the VM.  Uninstall the old PVS target software, reboot, install the new software, reboot.  PRO TIP:  Do your hypervisor tools need to be upgraded?  Now is the time to do it…
  • After you have the source VM exactly the way you want it again, just run XenConvert, create a new DYNAMIC vDisk, and push the image back up to PVS.

Time consuming?  You bet.  Rock solid?  Absolutely.  NO problems with this method.

-CG1

Advertisements

Comments are closed.