-
Use Disk2Vhd and create a VHD for the partition you want to convert. (If using VirtualBox, disable Vhdx option)
-
Open Windows 10's native
Disk Management
tool (Run >diskmgmt.msc
). Attach VHD (Action > Attach VHD). -
Convert to MBR Disk
using AOMEI Partition Assistant Demo (if there's another way please post a comment) -
Detach VHD
-
Once done, create a new VM in VirtualBox and select the newly created VHD
-
Attach a Windows 10 ISO (use the Media Creation Tool to create it) to the VM
-
Turn on VM and boot ISO
-
Select
Repair your computer
and thenCommand Prompt
-
Run the following commands:
diskpart
list disk
select disk 0
list partition
select partition 1
active
exit
In my case there was only 1 disk and partition.
- Run the following commands:
bootrec /fixmbr
(this command will fix MBR)
bootrec /fixboot
(this command will fix boot sector)
bootrec /scanos
(this will scan for Windows installations to add)
If fixboot
replied with the error Access denied
, then run the following command:
bcdboot C:\windows
- Reboot and enjoy your fixed VM !
PRs welcome for fixes & improvements !!!1!
SEO:
- Create virtual machine from installed Windows 10
- Fix "Fatal: INT18: Boot failure"
- Fix fixboot access denied
Sources:
- https://www.veeam.com/blog/how-to-convert-physical-machine-hyper-v-virtual-machine-disk2vhd.html
- https://www.diskpart.com/articles/convert-vhdx-gpt-to-mbr-4125.html
- https://superuser.com/a/1303238/940718
- https://social.technet.microsoft.com/Forums/en-US/7262c702-ce37-4853-9a12-5cafcf10342e/disk2vhd-efi-vhdx-vm-fails-to-boot-solved?forum=winserverhyperv
- https://forums.virtualbox.org/viewtopic.php?f=2&t=86038#p409915
Hey @bre7, I was following the steps but when I enter
active
on my selected partition, I get this error.I've seen some articles for converting a GPT disk to an MBR disk, but in that case, they use a
clean
command which will delete all partitions :SDo you know how I could bypass that problem by any chance?
Thank you!
Forgot to mention that before trying with the GPT partition, I tried converting the VHDX file from GPT to MBR, but then that file was failing to be added in Virtual box with:
Another issue I've been facing is that when creating to convert from GPT to MBR is that when I
Attach the VHD
file, which was created from a single partition, not sure why butdisk manager
loads the complete original disk (which that partition and with another RAW partition there).Not sure how all this interacts but when I then try with Acronis to change from GPT to MBR on that disk, it says that it needs to reboot my system rather than just changing that type while I am inside windows.
The problem with this has been that then, on the reboot, the VHD was not mounted (as I was expecting) so the tool has messed up all my other hard drives, changing random ones from GPT to MBR (even where C: windows was installed) but the VHD is still in GPT format.
This whole process is still so complex and messed up in some scenarios. Wondering how's not much easier by now.
I'll see if I eventually have it working trying things.
Final update for today. Trying in a different desktop PC with a different hard drive, I managed to at least convert the VHD GPT to MBR and tried the steps above.
Finally, I managed to
activate
the partition that had the VM, but... now that's just booting to a Black screen :S