Category : Note
This post outlines the steps to build a Reverse Image of a Citrix Provisioning Services vDisk with XenApp 6.5 Server to a VM with locally attached hard disk.
Whenever you have to install or upgrade software on a vDisk that interferes directly with the Citrix Provisioning Services infrastructure you need to choose the Reverse Imaging approach. The installation of such software would fail within a system that was booted either from the vDisk in Private mode or from a Maintenance version of the vDisk.
Reverse Imaging means booting from vDisk in order to capture the vDisk’s contents to a local hard drive. Afterwards you can boot from the local hard drive an make the changes without any of those issues that would arise if you’d have tried to change the vDisk directly.
Reverse Imaging is a time-consuming task. Normally you’ll capture a new vDisk following the Reverse Imaging process. In total you should plan a man-day including preparation, performing the Reverse Imaging, applying the updates, and capturing a new vDisk. Therefore, I recommend to start with it just at the beginning of the work day.
- Dedicate or create a VM and PVS target device for the Reverse Imaging process. (For istance, an already existing update VM/target device for vDisk maintenance purposes would be a perfectly possible candidate for Reverse Imaging.)
- Create and attach a new local hard disk to the Reverse Imaging VM that matches at least the size of the vDisk. (The HD size can be greater though, meaning that with Reverse Imaging you can’t only update software like VMware Tools but also increase the vDisk size as a side benefit.)
- Prepare the source vDisk using one of this options:
- Create a new version of the vDisk and keep the predefined mode, that is “Maintenance” (PVS 6 style)
- Copy the vDisk and put it in Private mode (PVS 5 style)
- Check or set the following target device properties:
- Boot from: vDisk
- Type: Maintenance
- Double-check the target’s vDisk assignment. (Use the vDisk prepared in the third step)
- Boot the target VM from vDisk and log on
- Launch the disk management mmc snap-in.
- Initialize the new local hard disk. (Keep default settings.)
- Partition and format the hard disk. Keep the default disk type (Basic). The partition needs to be either a simple volume or at least a primary partition. (PVS reverse imaging doesn’t support both extended partitions and dynamic disks.)
- Launch the XenApp Server Role Manager and leave the current farm.
- Use the PVS Device Image Builder to invoke the reverse imaging process. (%ProgramFiles%\Citrix\Provisioning Services\BNImage.exe)
- Image Builder will automatically reboot Windows. Log on to let Image Builder finish building the reverse image.
- Once again, the Image Builder will automatically reboot the target. Log on and confirm a message box saying “The device image build is complete”
- Launch the disk management mmc snap-in and mark the partition of the new local hard disk as active.
- In the PVS console, change the target’s “Boot from” setting to “Hard Disk”
- Reboot the target and apply the required changes, updates, whatever..
- Prepare capturing of a new vDisk with PVS Imaging Wizard, reboot, and log on to let XenConvert building the vDisk.
- Close XenConvert to let Windows finalize the logon process.
- In the PVS console, change the target’s “Boot from” setting to “vDisk”. Leave the vDisk in Private mode
- Shutdown the target device VM.
- Detach the local hard disk that was used to hold the Reverse Image.
- Boot the target device VM and log on.
- Launch the XenApp Server Role manager to prepare this server for imaging. (As the server already left the farm in step 8 you need to deselect the corresponding option.)
- In the PVS console, change the new vDisk’s mode to Standard and configure the relevant targets to boot from this vDisk.
- Clean up. For example you won’t ever use again both, the local hard disk created in step 2 and the Private mode vDisk or vDisk Maintenance version prepared in step 3.
Disclaimer: I hope that the information in this post is valuable to you. Your use of the information contained in this post, however, is at your sole risk. All information on this post is provided “as is”, without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by me. Further, I shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.