How to – Emergency P2V from a external hard disk to Hyper-V

Hello, this is more of a reminder to myself but I hope others can use this. This works with Hyper-V but could work with any virtualization platform.

The reason for this post. A customer laptop wouldn’t power on, and the customer needed files from the hard drive which was in tact. So here is what I did t get it up and running under my Lab Hyper-V.

  1. Take out the disk, and run disk2vhd on the drive. Ensure you get all partitions, including any extra manufacturer partitions (yuck)
  2. Copy the vhd to your HV host, create a simple VM with ample ram, and select the vhd just created, also mount a windows 7 iso
  3. Start the machine, boot from the iso
  4. At the first windows setup screen, press Shift-F10
    image
    image
  5. Load up regedit, and navigate to HKLM
    image
  6. Click file, load hive
    image
  7. Navigate to the windows\system32\config folder of the attached drive, and load up the SYSTEM hive
    image
    image
    image
  8. Use any name for the load hive key name, I used “test”
    image
  9. Navigate to HKLM\test\ControlSet001\services\intelide
    image
  10. Set the Start DWARD to “0”
    image
  11. Navigate back to HKLM\test, and click File, unload hive
    image
    Click Yes
    image
  12. Close all windows, and reboot
    image
  13. Done.

Basically, what we’re doing is turning on the Intel IDE driver which might be disabled on computer with AHCI and other SATA drivers. Since we use Hyper-V’s IDE driver to attach the disk, the driver doesn’t load at startup and this allows the driver to load so that the rest of windows can boot up!

Thanks to Jeffrey Goines.

Hyper-V : Mounting ISO’s from a Network Share

To mount an ISO to a VM running under Hyper-V requires a few tweaks to the domain account to let this happen. I don’t recall where I found this tip, but I had to do it again and it took me a while to find the settings I had made.

In essence, here are the steps required

  1. Make sure the share is accessible by the computer account hyper-v is running on. In my case, it was adding TNVS2 to the network share*. You can use “everyone” but this is better I think. Just read is enough
  2. On the domain computer account, edit the delegation properties. We need to add the network storage server to this account for delegation. Select “Trust the computer for delegation to specified services only”, and then click “Add”. Enter the server name where the shares reside. It will now show you a list of services from the server, select “cifs”.
  3. Set the protocol to “Use any authentication protocol”

That’s it.

* For ease, I created a Security Group in AD called “Hyper-V Servers” and then added all the hyper-v servers computer accounts to it, to make security assigning easier when adding new servers to the farm.