Provisioning Services Versioning Uncovered and Explained!

Howdy and welcome to a hopefully insightful blog about the Versioning feature in Provisioning Services 6.x

It occurred to me through replying to a comment on my own blog about PvD and after speaking to a colleague yesterday that although Versioning in PVS has been available since 6.0 which was released in September 2011 (?) and that although people are using PVS 6.x, they may not know of or fully understanding the new versioning feature.  I know of a couple of customers that are on PVS 6.x are do not use it and have since been educated in the marvellous ways of this well needed feature that is a) pretty exciting as IT goes and b) makes PVS soooooooooo much easier now.

This post will cover how to use the Versioning feature, including change the VM type, booting different versioned images of the same vDisk and some (hopefully) handy tips!

In the olden days, when IT was king and the user was a nuisance you had to put up with, updating a PVS image was the most clunkiest thing ever.  You had a make a complete copy of a 40-50GB disk, rename it, change it to Private Mode, add it to a VM, boot, make your changes, reseal, shutdown, remember to put it back into Standard Mode, roll the image out to test server(s) and make sure all was well.  Then depending on your approach, you would either have to rename it again or assign it to all your productions servers/desktops.  Wow, how did PVS survive for so long?

Now, although the updating of the actual disk hasn’t changed (you still have to turn it on and install stuff), there is no longer need to copy the bloody thing (taking up storage) and do all the renaming and assigning palaver.

Now you can create a chained difference disk which, like a snapshot for a virtual machine (VM), will be chained to the “master” but will contain all the changes made from that point forward.  This has the following advantages:

1)      Takes up less disk space as you do not have to copy the whole disk.

2)      You can easily roll back changes, like with a snapshot for a VM, you can just revert to the previous state if the update fails or you have issues with the changed vDisk.

3)      You have a record of change control to the vDisk.

4)      You leave the actual vDisk in Standard Mode and never have to change it to Private.

Click here for Citrix’s explaination of the chained difference disk

Here’s how it works;

From within the PVS Console, navigate to the vDisk Pool and then right-click on the vDisk you wish to alter and select Versions…

Selecting versioning from the PVS Console

You can see that there is just the one version, Version 0 which is the Base image.  Note that you have to have the vDisk in Standard Mode otherwise you will not see the Versions… option from the menu.

Select New

From the vDisk Versions window, click New.  You will now see that there is a new version created, in this instance, version 2 with an Access type of Maintenance.  This is the read-write difference disk (.avhd) file.  Click Done.

If you go to your vDisk store, you will now see the difference disk .avhd file.  When you boot the image from this new maintenance disk, you can see it grow in size.  It isn’t uncommon for 600MB to be written to the disk just during boot up for a Windows 2008 R2 box and 200MB for a Windows 7 one!  I have marked the original .vhd file in yellow and the new, .avhd difference disk in red.

vDisk Store

Back in the PVS Console, navigate to the Device Collection that houses the VMs that boot from the PVS image.  In this case we will be making changes to the XenDesktop device collection.  You can see that there is already a target device XD001 with a type Maintenance.  This will be the device we boot from the Maintenance image.  The other devices are set to Production and cannot be booted from the maintenance version of the PVS image, only the Production image.   I’m sure you are starting to see the pattern here J

Device Collection


My preference is to have a separate VM for both the Maintenance and Test images.  This way, you will not have to change the assignments within the Device Collection, making it even easier to change, test and rollout new updates to the vDisk.  All you will have to do is boot up the VM, select the image and voila!  I accept that this isn’t always possible due to capacity within your virtual estate but it is highly recommended and will make it easier to keep track of things.

So, we now have a maintenance image, a VM in Maintenance mode so what we need to do now it boot it up.  Now, something to bear in mind is that when you boot a vDisk in Maintenance or Test mode, there is one further piece of manual intervention.  When the Maintenance/Test image boots up, it will prompt you to choose which image you wish to boot from.  The VM will sit on this screen indefinitely so if you are wondering why the VM hasn’t booted, check in the console to see if it is waiting for user input.

In this case, we want to select 1) Windows7x86_2.1 [maint] and press Enter.

The vDisk will now boot as normal and you can make your changes.  Remember that in Maintenance Mode, the disk is Read/Write so all changes will be saved.  Once you are happy with your updates, run your Reseal script and shutdown the VM.


Put your Reseal script on the C:\ drive of your image in a folder with restricted permissions to Admins so that users cannot see it.  That way, you will not have to hunt around for the reseal script and can just double-click to run it when required.

Now that the VM is shut down, you will want to test your changes.  Go back into the PVS Console, navigate to vDisks, right-click and select Versions…  Click on the Maintenance image and then select Promote.

You will now be asked which type of image you wish to Promote to; Test or Production.  Select Test and OK.

You will now see that the image has changed type to Test.  Also note that the icon has changed from a Cog symbol to a magnifying glass to symbolise the change.

The next steps are exactly the same as before.  You will need to make sure that a VM in the Device Collection is set to Type “Test” and once booted, go into the VM console and select the image you wish to boot from.  Note that you DO NOT have to do this for Production images, they will boot automatically.

In this example, from the boot menu, select 1) Windows7x86.7 [test] and press Enter.

The image will now boot in READ-ONLY mode.  This way, you can test the changes to the image in a safe, non-changeable environment that will mirror the Production image.


You can make all these changes to the vDisk image whilst Production servers are running happily off of the previous Production image.  Creating Maintenance and Test images will not affect production servers so you do not have to do testing when all your production users have logged out.  This means potential quicker rollouts of changes made.

If you are happy with this image, you can then promote it to Production ready to roll out to all your production servers.  The process is exactly the same.  Go into the PVS Console, vDisks, highlight your vDisk and select Promote.  You will now have the options to promote the image immediately or schedule them for a later time.

You will now see that you have a new Production image, indicated by a green circle with a white tick in it.


You can promote a new version to Production without affecting live users as the image will only become Live after each VM is rebooted.  Up until that point, all users will be running off of the previous version, in this instance, version 1.  This gives you more flexibility as you can promote a change to Production whilst users are still logged in and know that the changes will not come into effect until a scheduled reboot.  This way, you will not necessarily have to “manage” the rollout of a change as it will effectively roll itself out for you! J

Reverting an image

If, for whatever reason, you need to rollback a change as it hasn’t fixed an issue or is having an adverse effect, this is also a lot easier with PVS Versioning.

Go into the PVS Console, navigate to vDisks and right-click on the vDisk in question and select Versioning…  Highlight the version you wish to rollback and select Revert

If the image is in Production mode, you have the option to rollback to Test or Maintenance.  If the image is in Test mode, it will just rollback to Maintenance.  Then, you can either make further changes or just delete this difference disk and start again.

Changing VM Types

From within the PVS Console and the Device Collections, if you wish to change the Type of a VM to or from Production/Test/Maintenance, this is easily achieved.

Right-click on the VM and select Properties.


Under the General tab, you will see the new box of Type.  From the dropdown list, select the type you wish and click OK.

Hopefully this will give you a good overview of how the Versioning in PVS 6.x works and hopefully you’ll be able to use this in your environment as it will save you time, money and disk space.

Keep an eye on my blog for what will hopefully be more insight into the world of virtualisation!

Thanks for reading.


5 thoughts on “Provisioning Services Versioning Uncovered and Explained!

  1. Mike says:

    Thanks for the great read, we are about to migrate from a XenApp environment to a XenDesktop one. I was still a little unsure on how this versioning would work and the boss was wondering if we should just keep it simple and use MCS (we are a smaller company), but after this read its pretty obvious that PVS will help keep the the operating time and costs down.

    • Hi Michael,

      Thanks for the comment and I’m glad my article was useful as that’s what I wanted to do – Simplify PVS and the Versioning tool as to be honest, it’s one of the best features Citrix have released in 2-3 years. PVS is a great tool and now it is even greater. The more people out there who find this article useful and realise that PVS isn’t a complicated tool, the better.

      Thanks for reading.


  2. EVD says:

    Thank-you for Good info Stephen.

    What about the Version 0 Base can i delete that after we are promoted to the new version? In my environment we have version 5 with green check and the base 0 with red X , Can we delete this base ?

    • Hi there,

      It depends. If have rolled up your difference disks into a NEW BASE image, then yes, you can remove it (ALWAYS take a backup first though!) You can check this by going into the vDisk store and seeing the file extension of the Version 5 disk. If it is .VHD then it’s a new base image and you should be OK to remove the version 0 base. If it’s a .AVHD file, then it is not a new base image but just a difference disk with all the previous difference disks (.AVHD files) rolled into one. So, in your case probably versions 1 – 4. Make sense? This may help to explain

      So, check the file extension in the vDisk store first and all will be revealed. Remember to back it up before you remove it from the PVS console. If you do remove it, you’ll have two options; remove it just from the console or remove and delete the vDisk so pick carefully.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s