DiskToVhd generated VHD is not bootable

I had windows 10 laptop, I used disk2VHD to convert disk into VHD. Now I am trying to mount it to virtual box on another machine, but it seems be not booting.

I used windows 10 ISO and through CMD I think non of my partition has property bootdisk = yes.

Please guide, how can I convert this VHD to bootable ?

enter image description here

Update

I find this article,

https://blogs.technet.microsoft.com/jonjor/2011/10/04/vm-does-not-boot-following-p2v-or-disk2vhd/

based on it I tried step, on step 8 I am stuck, please see image below

enter image description here

Update 2

This is main machine

enter image description here

More updates based on comments

I still have access to physical machine, it only has 1 C: Drive and rest are two System EFI drive + recovery drive.

When I use Disk2VHD, it only shows me 2 drives to copy not 3.


Solution 1:

What you need is mountvol drive: /S, which mounts the EFI System Partition to a drive letter so that disk2vhd will discover it, where drive: can be any available drive letter (e.g. D:):

enter image description here

enter image description here

enter image description here

enter image description here

Make sure you run both the Command Prompt (for mountvol) and disk2vhd as administrator.

If you have Windows 10 Pro/Enterprise and the Hyper-V feature added, you can also use the New Virtual Hard Disk Wizard in Hyper-V Manager (or the New-VHD PowerShell cmdlet) instead to create a VHD(X) from a Physical Drive:

enter image description here

This does not require you to mount the ESP with mountvol.

Solution 2:

I hope you have the original Windows laptop (which uses efi and gpt disk). This is a procedure that we might use to bypass the Disk2VHD problem. The very problem you are experiencing while trying to utilize it. In Windows server 2012/Win-8.1, this works. I hope you may be able to use it.

  1. Use the Disk2VHD tool. Execute it and set a location to store the VHDX file. You could click the Create button to do this.
  2. For the next step, you could use the same machine. You have to use a machine running Windows 8.1 or beyond.
  3. Mount the VHDX. Also make a note of the drive letter.
  4. In the next step we would convert the GPT to MBR.
  5. Use your favorite disk editor (I recommend you to use a third party software to reduce the overhead and complications), and view the disk properties.
  6. Right click the GPT disk and convert it into am MBR. Accept the warnings.
  7. In the step 3 you have noted down the drive letter. Now, delete all the drives in that gpt disk before the noted drive letter.
  8. Disconnect and Eject the disk.
  9. Load the VHD using Hyper-v or Virtualbox (I have not tried Virtualbox as I am not using it).
  10. Attach a bootable iso to the virtual machine.
  11. Boot from the iso.
  12. Go to repair options.
  13. Click Troubleshoot and next, open up the command prompt
  14. Run the following commands (you may need to adjust the disk and partition numbers, depending on your configuration scenario)

    diskpart list disk select disk 0 list partition select partition 1 active exit

  15. Reboot again and run the following commands

    bootrec /fixmbr bootrec /fixboot bootrec /rebuildbcd

  16. Boot normally next time.

The problem with your 2nd approach is that you did not have a working boot partition which you could create. It is not marked as active. However, as I am not aware of the procedure you took to capture it, you have to try using this solution to tweak the thing.

Solution 3:

I guess another viable alternative would be doing things the old fashion way.

Step 1: Clone your physical machine with Clonezilla to an external USB drive

Step 2: Plug the USB drive to your Virtualbox host machine

Step 3: With a new guest session on Virtualbox, initial boot up with the Clonezilla ISO file, along with a blank and large enough VHD (hopefully 300GB is enough in your case?) and also make sure that your new guest is able to access the external drive. You may get ideas from this video

Step 4: Complete the restore and then boot with new VHD file instead

Step 5: If there is any issue you may use your Windows10 ISO for further troubleshooting (just like what you did)

Actually if you got a fast local network and not mind having the main machine being offline for a little longer you may try to use the ftp option on Clonezilla. With live ftp you can bypass a temporary storage for holding the image files (in this example, an USB drive)

Hope this helps.