Convert VHDX GPT to MBR: Fix P2V (Hyper-V) Conversion Failed
Convert VHDX GPT to MBR: Fix P2V (Hyper-V) Conversion Failed
Why should you convert VHDX GPT to MBR? If you try to run a P2V conversion on a Windows Server 2012 r2 PC with the UEFI boot mode but keep failing, you might as well convert VDX GPT to MBR first and check whether the issue is resolved.
Scenario: P2V conversion on Windows Server 2012 R2 failed
Recently, I need to convert a physical Windows Server 2012 R2 server to a virtual machine. I downloaded the Micro Virtual Machine Converter and ran through the progress to start the P2V conversion. It took a few hours. But when I got to the very end of the wizard, it gave me an error like the following:
“Microsoft Virtual Machine Converter encounters an error while attempting to convert the virtual Machine. Details: There are blocking issues for the physical-to-virtual conversion: There is no BCD boot device found in the source machine, noticing that the conversion of an EFI boot machine is currently not supported.”
When you check the whole operation, you haven’t found any reason that would cause the error while attempting to convert to the virtual machine. Well actually, you should be concern about whether your server was configured with UEFI when it was deployed. Because the Virtual Machine Converter does not support P2V conversion for UEFI computers with GPT disks.
Disk2VHD convert a physical disk to VHDX
For this situation, you need to convert the physical disk to VHDX first with the tool from Microsoft called Disk2vhd. You can download this tool and run it. Set the location where you want to store the VHDX file and click Create.
After the progress completes, you need to convert the VHDX GPT to MBR.
Convert VHDX GPT to MBR successfully
Converting VHDX from GPT to MBR may help you fix the P2V conversion error: There are blocking issues for the P2V conversion: There is no boot device found in the source machine, noticing that the conversion of an EFI boot machine is currently not supported.
To convert the disk from a GPT disk to MBR disk, here we highly recommend you move the VHDX file to another Windows machine. And then, you can use the reliable third-party software AOMEI Partition Assistant Professional, which can run on all editions of Windows XP/Vista/7/8/8.1/10 and the latest Windows 11, to make the conversion between MBR and GPT.
Take a Windows 10 computer for example. Right-click the VHDX, and choose Mount to mount the VHDX file.
Mark the drive letter that is assigned to the disk after it is mounted. Here is H:\.
After it completes, remember the drive letter of the mounted VHDX file, and use AOMEI Partition Assistant to convert VHDX from GPT to MBR as follows:
Step 1. Download AOMEI Partition Assistant, install it on your Windows PC, and launch it.
Step 2. It will display its main interface containing the basic info of your disks including the VHDX GPT drive. Right-click it, and select "Convert to MBR".
Step 3. It will pop up a window with warning messages, you need to read it and click "OK".
Step 4. You will go back to the main interface and you will see the VHDX GPT has already changed into MBR. But it’s not done yet, you need to click "Apply" in the toolbar to execute the task.
*There may be many extra partitions at the beginning of the disk. You can use the function Delete Partition of AOMEI Partition Assistant to delete those extra partitions.
Create a new virtual machine successfully
After converting VHDX GPT to MBR, you should disconnect from the VHDX file in File Explorer. Right-click the mounted VHDX file, and select Eject from the pop-up menu.
Next, you can create a new VM in Hyper-V Manager. During this operation, you need to make sure that you choose a Generation 1 VM, instead of creating a new VHDX file, attach the file that was generated by Disk2vhd that we’ve edited.
Fix Disk2vhd Hyper-V boot failure
You will meet a black screen with a blinking cursor that never boots into Windows Server 2012 R2. Don’t worry, it simply means the path to load Windows cannot be found by the boot loader. And this may be due to the boot loader, or it may be due to the MBR or Boot Sector. Thus, you need to repair the VHDX so it will boot into Windows Server 2012 R2.
First, you need a Windows Server 2012 R2 to install an ISO image or DVD. Prepare to boot your VM from this media. Using the recovery console to do it.
1. Attach the Windows Server 2012 R2 installation disc to the virtual machine disc drive, then, start the computer.
2. Press a key when you are prompted.
3. Select a language, a time, a currency, a keyboard, or an input method, and click Next.
4. Click Repair your computer.
5. Click the operating system that you want to repair, and click Next.
6. In the System Recovery Options dialog box, click Command Prompt.
7. In the command prompt, you need to type the following command to make the partition on the VHDX active:
•select disk 0
•select partition 1
8. Then, you need to reboot the VM and boot to the Windows Server 2012 R2 setup ISO again, and run the same progress until you get to the command prompt. In the command prompt, type the following command to set your system straight:
•bootrec /fixmbr (this command will fix MBR)
•bootrec /fixboot (this command will fix the boot sector)
•bootrec /scanos (this will scan for Windows installations to add)
You are now able to boot into Windows. If you still do not boot into Windows or do not have a boot menu, or something is still wrong, you can reboot the VM and boot to the Windows Server 2012 R2 setup ISO again till you get into the command prompt, type the following command:
•bootrec /rebuildbcd (this will rebuild the entire BCD)
After doing those steps, you’ll be asked if you want to add the installation to the boot lost, type "y" and press Enter. Detach the Windows Server 2012 R2 ISO and reboot the system, and you should be greeted by a normal boot screen while Windows adjust to its new virtual hardware.
To convert vhdx GPT to MBR, this post is enough to help you. AOMEI Partition Assistant is a handy tool for solving common problems of Windows users. You can also use this tool to extend the C drive, or quickly replace HDD with SSD without reinstalling Windows.