P2V a GPT based Disk To Hyper-V

So anyone who’s ever tried to perform a P2V of a GPT based computer, By GPT based I mean that the boot disk is GPT and not basic, knows that after the P2V the new VM will not boot.

However, luckily, there is a way around this.

First of all perform the P2V using a toll such as Disk2VHD.
Take the newly created VHD file and attach it to an existing Virtual Machine. I would recommend a Windows 7 workstation VM if you have one. alternatively you can also mount the new VHD in your own Windows workstation using disk management. If your new file is a VHDx file then your going to need a windows 8 workstation or higher.

atatch vhd

Now install on the workstation a product called AOMEI Partition Assistant Standard. The standard version is free and can perform the functionality required to perform the following tasks.

Open Partition Assistant, locate your converted disk (it should show up as a GPT disk), right click the disk and choose the option “Convert to basic disk”, Confirm the prompt and then click apply in the top right corner.

Now that we’ve converted the disk to basic we need to reattach the VHD to our virtual machine, if you haven’t created a VM yet now is the time to do it.

The new VM still won’t boot, the next step is to boot with a Windows 2008R2 installation disk (any other version will also work).

Boot the VM from the Windows 2008R2 installation disk and choose the “repair your computer option”.

In the windows that opens choose from the top “use recovery tools”, click next and the choose the command prompt option.

Now we need to type a few commands.

1. diskpart

2. list disk

3. select disk #

4. List Partition

5. Select Partition # (this is the partition with our windows installation)

6. active

7. Exit

Now reboot the VM. Boot from installation CD again and return to the command prompt.

now type the following commands.

1. bootrec /fixmbr

2. bootrec /fixboot

3. bootrec /rebuildbcd and click y

reboot VM again and once again boot from installation CD and return to the command prompt.

run these final commands

1. cd recovery

2. startrep

reboot VM again, but this time not from the installation CD, your windows VM should now successfully boot.

Good Luck!!!




3 thoughts on “P2V a GPT based Disk To Hyper-V

  1. THANK YOU guy – U saved my day! 🙂
    Your instructions work very well, but in the times of Windows Server 2016 you have say, that this works only on Gen1-VMs but NOT for Gen2, as they only support UEFI. What I can tell is that you will fail at the “bootrec /rebuildbcd”-command if you have a Gen-2-VM 🙂
    And in my special case (p2v an Win 2012 Essentials) the “startrep” endend with an error – but anyway evereything is fine afterwards…

  2. You are a life saver!!! I had tried everything besides the very last part (startrep).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s