Reverse Engineering a vDisk (VHD)

So you’ve got this awesome Golden Image that has everything on it you could possibly want. You can make that puppy boot to bare metal and to ESX and even to Hyper-V if you feel like it.

But then Citrix comes out with a new Provisioning Server update that requires you to unprovision or Reverse Engineer that vhd to do updates. There are a handful of reasons why this might be unnecessary:

  • New versions of PVS require Target Device software updates
  • New NIC
  • New NIC driver update that needs to be applied

Any one of those could BSOD your server if you try to do them to a provisioned vDisk so you need to RE them to do the update.

        1. Make a copy of your vhd and boot it into Private Mode on a server
        2. Open Disk Management and ensure that the local hard disk is showing online. It should show up as Disk 0
        3. Format the local hard disk (if you’ve moved your page file or spooler or anything to this disk, you’ll need to move those off first)
        4. Go to a command prompt and run C:Program Files (x86)CitrixXenAppPrepXenAppPrep.exe /pvs
        5. Click on Start —> All Programs —> Citrix —> XenConvert
        6. Select “From Volume to Volume”
        7. Select Source Volume as D: and destination volume as C:
        8. Select Next and start the Conversion. This will take several hours.
        9. After Conversion reboot and go into the BIOS and select to Boot from Local Disk
        10. Go to control panel and uninstall the “Citrix Provisioning Services Target Device x64”
        11. Reboot
        12. After the reboot make any changes you need to make (NIC updates, adding/removing NICs, etc)
        13. Reboot again
        14. Reinstall the Target Device software from the PVS disk
        15. Go to your PVS server and open the PVS Console
        16. Go to properties of the target device and select “Boot from: Hard Disk
        17. Create a new vDisk in the PVS Console and assign it to the target device
        18. Reboot the target device and go into the BIOS. Change the boot order to boot from network.
        19. Open Disk Management and ensure the local hard disk is showing online. It should show up as Disk 1. You should also see a Disk 1
        20. Format Disk 1
        21. Go to a command prompt and run C:Program Files (x86)CitrixXenAppPrepXenAppPrep.exe /pvs

      1. Run XenConvert again and image from the local hard drive (C:) to the VHD (D:)
      2. This will take several hours.
      3. When it’s done, shut down the target device.
      4. Go back into the PVS console and change the properties of the Target Device to boot to vDisk.

You’re done! At this point you’ve still got your old VHD and now your new one with all the updates. You’ll also have everything on the local hard disk on that target device so you may want to go back after you boot it thru PVS and re-format that disk so that you don’t have any booting accidents.

Advertisements