Our purpose in creating this guide is to lay out a step-by-step procedure for updating XenTools on a PVS image, and to document some of the pitfalls involved with the process.
Please keep in mind that failure to follow the correct sequence can brick the image, in which case you must start over from scratch.
This procedure applies to PVS images hosted on XenServer, but a similar process can be followed if using VMware as your hosted hypervisor.
1) Reverse Image vDisk
First, we need to attach a second drive that is the same size as the disk image. Make sure the new disk is not in position 0 (please note that the cache drive can be detached as it not required):
Initialize the disk and format it (GPT can be used as well, and may be a better choice):
Create a volume and assign a drive letter to the new drive:
Download and install XenConvert for the OS version that you are using:
Select “Volume” and “Volume” for the “From” and “To” selections on the Welcome screen:
Select the C: drive as the source volume and the new drive (F drive) as the Destination:
Click “Convert” on the next screen:
If you see the warning below, click “Yes”:
Once the conversion is complete, click “Finish”.
2) Remove Target Device and VDA
Shut down the machine and detach the Cache Drive:
In the Provision Services console, set the machine object to boot from the Hard Disk in the Target Device Properties:
Also remove the vDisks from the machine object:
Boot up the machine with the newly created drive. You may have to set the VM to boot from the Hard Disk and uncheck the Network boot option (please note: you may need to boot the machine up with the vDisk and mark the new drive as active if the system doesn’t boot up):
You need to exit the provisioning target device process from the system tray (you can also view the status to make sure there are no vDisks attached):
End the process called “BNDevice.exe” from the task manager:
Now, uninstall the Citrix Provisioning Services Target Device x64 application:
3) Update XenTools and Create New Image
Reboot the machine and then run the XenTools update installer and follow the prompts (a couple of reboots may be required) and click “Done” when it is complete:
When the windows prompt comes up, select “Restart Later” or you will brick the machine
. This must be selected for Citrix to finish the tools update:
After the XenTools update, you may need to remove the old ghosted adapter, so set the device manager to show hidden devices (a failure to do so could prevent new image creation):
When Device manager comes up, select view→show hidden devices and expand the Network adapters group. Locate the ghosted adapter and uninstall it:
Reinstall the Citrix Provisioning Services Target Device from the ISO and run the installer PVS_Device_x64.exe. – then follow the prompts and restart the machine:
Before you cut a new disk make sure there is a vDisk connected (it will change it later). Make sure to set it to boot from Hard drive on the machine object in the PVS server, otherwise the process might fail:
Change the boot options in XenCenter to only boot from the network, and reboot the machine:
Now you are ready to cut a new disk. Make sure the machine is online with the provisioning server by checking the provisioning target device status in the system tray. From the start menu, launch the Provisioning Services Imagine Wizard:
Click “Next” to start the wizard and enter the Provisioning Server (use the IP on the same network segment). Use Windows Credentials unless you logged on with a local account, then enter them:
Select “Create new vDisk”:
Create a vDisk name and choose the store (make sure to use one you used for your Master Device Collections) where you want to place the new vDisk and click “Next”:
For the master image, choose “None” for the KMS setting. You will set KMS on the production image later on:
Make sure to set all other drives to “None” on the Configure Image Volumes page (or the image may not be usable) and click “Next”:
Click “Next” on the Existing Target Device page (The existing master image target device):
If you see the following warning, click “Yes”:
Click the “Optimize for Provisioning Services” button:
Leave all the boxes checked and click “OK” on the dialog box:
Now click “Finish”:
Click “Yes” on the dialog box that says the machine must reboot:
After the server reboots, log in again and you will see the following dialog box displaying the progress:
When the image completes, click “Finish” and then shut down the machine. Detach the drive you used to reverse image (40 GB in this case) the vDisk and reattach the original cache drive (20 GB):
The new vDisk should be attached now, but you need to set the boot from option to “vDisk” again:
Attach any other drives that are needed for the image:
Boot up the machine and make sure it comes up properly. If you have issues, check the boot options and make sure you have it set to network boot.
Congratulations, you have successfully completed the procedure for reverse imaging a PVS vDisk and updating XenTools.