Part III – Updating a Pooled Desktop Image

Applies to: Windows Server 2012 and 2012 R2

Part III

In Part II we saw how to deploy and publish a Windows 7 pooled virtual desktop. Now let’s take a look at the steps needed in making a change or update to our image and making it available to users. To recap our environment, we have a Windows 7 pooled desktop collection available to our users. This was created from our master virtual machine called Win7master. Part of the process needed when we created our collection was to run sysprep on our master image. As a good practice measure, I created a checkpoint of the virtual machine prior to running sysprep. This was done so I can easily revert the virtual machine back to a normal state prior to when I ran sys-prep.

Within the Hyper-V console, revert to the correct checkpoint.



Start the virtual machine.


Once the virtual machine is started, you can login and make your change(s) to the image. For this example, I am updating the Microsoft Office application to the latest version. Once I have completed the update of Microsoft Office and made all of my changes, we will need to run Sysprep again. Prior to running sysprep, let’s create a new checkpoint for the virtual machine so we have a checkpoint to come back to when we are ready to make our next update to the image.


It is also a good practice to rename the checkpoint to a name which references the update made.



Once the checkpoint is created and renamed, we can run sysprep. Within the Windows 7 virtual machine, launch sysprep located in: %windir%system32sysprepsysprep.exe


You can also run the following command line:

Windows 7: %windir%system32sysprepsysprep.exe /generalize /oobe /shutdown

Windows 8: %windir%system32sysprepsysprep.exe /generalize /oobe /shutdown /mode:vm

Once Sysprep is completed, it will shut down the virtual machine.

Now that our virtual machine is sys-prepped and ready, let’s go back to RDMS within Server Manager. Within RDMS, click on our Virtual Desktop Collection.


Under the Virtual Desktop section on the right, click on tasks and select the option “Recreate All Virtual Desktops”.


Once the Wizard initializes, we can select our virtual desktop template. Highlight the master virtual machine and hit next. (Win7Master)


On the User Logoff Policy screen, we are presented with a few options. These options will allow us to schedule the re-creation of our virtual desktops. The first option will begin recreating any desktops which have no users currently connected. However, any users who are connected, the re-creation will not occur until they logoff. If the user doesn’t logoff, we can set a time frame which will force the re-creation of the desktop regardless if the user is logged in. So based on the following schedule, if the user is logged in between the dates listed, they will be automatically logged off and the desktop will be recreated using the latest update to our master virtual image.


The other option will allow us to force a specific time to recreate all the desktops regardless if a user is logged in or not. You can set it to perform the re-creation right away, or pick a specific time to start the re-creation. This is good in the event users were logged in. You would have to ability to schedule the re-creation during non-business hours so users are not disrupted. Since I currently do not have any users logged in, we will schedule the re-creation to occur now. Select “Recreate virtual desktops now and log off all users” and hit next.


On the confirmation screen, confirm the options selected and hit Create.

4-21-2014 6-37-43 PM

During the creation process, the process of exporting the virtual desktop template will begin. Once this is completed, the virtual desktops will be recreated based off the virtual desktop template.


After the virtual desktop template is exported, the option of closing the wizard is available. You can close out of the wizard and let the process run in the background. If you wish to come back and view the progress of the desktop re-creation, you can go back to the virtual desktop collection within RDMS and under the virtual desktop section, click on tasks and select “Task Status Details”.




During the re-creation of the virtual desktops, the actual virtual machines will be deleted and recreated from the RD Virtualization Host. After they are recreated, the machines will boot up and go through the sysprep process. This will use the settings configured for sysprep which were done during the creation of the virtual desktop collection. You can witness this process as it is happens. Here I am connected to the console of one of the virtual desktops Win7-2. Since I am connected to the console of the virtual desktop, when the virtual machine is deleted, Hyper-V will send a pop-up stating the machine was deleted.


After a few seconds, the machine will reappear back in the Hyper-V console. Within the Hyper-V console, reconnect to the newly recreated virtual machine.


Here we can see the virtual desktop is going through the sys-prep process.


Once the virtual desktops are finished with the re-creation process, users will be able to connect to the updated virtual desktops.


Here is a quick rundown of the re-creation process:

  1. Make the necessary changes and updates to the master desktop image.
  2. Create a new checkpoint once all changes and updates are made.
  3. Run sysprep on the master virtual image with the following options:

Windows 7: %windir%system32sysprepsysprep.exe /generalize /oobe /shutdown

Windows 8: %windir%system32sysprepsysprep.exe /generalize /oobe /shutdown /mode:vm

  1. Once sysprep is completed, go to RDMS and within the Virtual Desktop collection select the action to recreate all desktops.
  2. Choose the virtual desktop template
  3. Schedule the desktop re-creation
  4. Recreate the virtual desktops.