Reverse Imaging a PVS Target Device

By the title alone, most of us cringe at the topic or idea. The reverse imaging process for a PVS target device has greatly evolved over the years. Some of you may remember the brutal days of copying the image to a hard drive, making your changes, then recreating the vDisk using the Imaging Wizard or the P2PVS utility. Using either of these methods is extremely time consuming and at this point a waste unless you simply have no other choices.

However, prior to VHDX feature of PVS, my favorite method was to create a Xen SR pointed to the PVS server and boot directly to the VHD file. This worked flawlessly. But then VHDX feature came along and that was way cooler from an IOPS perspective than my effortless approach to reimaging devices. So I searched around to find a different method which supported VHDX files. And of course, the easiest route came from using BCDEdit to create an additional boot option. This boot option would point to the VHDX file. You could modify the image and then put it right back on the PVS server and done. So if I've peeked your curiosity then keep reading.

First, you need a VM with at least Windows 8/2012. You need a drive that's at least twice the size of VHDX disk (ex: in PVS, vDisk is allocated to 80GB, you need a 160GB data drive).

  • Boot the VM
  • On the Data Drive, copy the VHDX file to the drive
  • Open up command prompt
    • bcdedit /export c:\bcdbackup
    • bcdedit /copy {default} /d "PVS Image"
    • bcdedit /set {guid} device vhd=[drive letter:]\SomeFile.vhdx
    • bcdedit /set {guid} osdevice vhd=[drive letter:]\SomeFile.vhdx
  • Restart the Machine
  • Select PVS Image
  • Perform your updates
  • Update Xen/VM Tools
  • Perform Driver Installs
  • Update an old version of PVS Target Device (pre 7.6 Update 1)
  • Upgrade to 2012R2, 2016, 2019
  • Restart the Machine
  • Select Regular VM
  • Copy VHDX file back to PVS

Yep, you are done!!!

No comments:

Post a Comment

Citrix Workspace Single Sign On Woes

 In today's world, your security team is probably constantly pushing for settings to secure the environment. This may come from any vend...