-
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
amazing work. keep it up.