V2P -- Convert virtual hard disk to physical

Discussion in 'backup, imaging & disk mgmt' started by shmu26, Dec 25, 2019.

  1. shmu26

    shmu26 Registered Member

    Joined:
    Jul 9, 2015
    Posts:
    1,550
    I have a VirtualBox hard disk with Windows 10 on it that I would like to convert to a physical disk.
    Ostensibly, I could do this as follows:
    1 Install Macrium Reflect (or other imaging software) in the VM.
    2 Run Macrium Reflect in the VM and take a system image of it.
    3 Restore the image onto my physical disk.

    Problem is this: the VM is legacy boot, but the physical machine is set up with UEFI boot. I did the above procedure and I ran into major booting issues that I couldn't figure out.
     
  2. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,151
    Location:
    NSW, Australia
    shmu26,

    Can you do a MBR to GPT conversion on the restored image? Or if it's on the same disk as your booting Win10 you should be able to fix it with BootIt UEFI. But you would need to buy the software and the result isn't guaranteed.
     
  3. shmu26

    shmu26 Registered Member

    Joined:
    Jul 9, 2015
    Posts:
    1,550
    So will this work?
    I restore the image to some spare space on a second hard disk, then I convert MBR to GPT. Then I image it again, and restore it onto my booting Win10 disk.
    But to tell you the truth, I don't think GPT is the problem here. Let me explain. I created this virtual hard disk a couple years ago, using the VMware standalone converter tool. I performed P2V. At the time, if I remember right, the VMware standalone converter tool offered an option to convert from UEFI to legacy boot, which I did.
     
  4. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,151
    Location:
    NSW, Australia
    I'd restore the image to a spare HD in the same computer that contained the VirtualBox OS. Then remove all HDs accept for the spare HD. Does the restored OS boot?
     
  5. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,151
    Location:
    NSW, Australia
    Forget the booting part. I mistakenly thought you were using 2 computers.
    Is the spare HD a MBR or GPT disk.
     
  6. shmu26

    shmu26 Registered Member

    Joined:
    Jul 9, 2015
    Posts:
    1,550
    My second hard disk, which I use only for storing data, is MBR. I also have an external hard disk, which is also MBR.
     
  7. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,151
    Location:
    NSW, Australia
    Fine. Restore your image to the MBR disk. Does the image contain a System Reserved partition?

    Disconnect your main Win10 HD. Do a MBR to GPT conversion on the "second" disk and see if the restored Win10 boots.
     
  8. shmu26

    shmu26 Registered Member

    Joined:
    Jul 9, 2015
    Posts:
    1,550
    Thanks.
    When I restore it to the MBR disk, does it need to be the left-most partition? Or can I just shrink the last partition on the disk, and restore to the right-most end of the disk?
     
  9. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,151
    Location:
    NSW, Australia
    Put it where ever you like.

    If there is a System Reserved partition, make sure to restore it too. Remember, you can only have 4 primary partitions on a MBR disk.
     
  10. shmu26

    shmu26 Registered Member

    Joined:
    Jul 9, 2015
    Posts:
    1,550
    I restored to second hard disk, and converted to gpt
    First I was greeted by a blinking cursor. Macrium Reflect boot repair got me past that one.
    Then it booted, and installed device drivers, and then I got a repeating BSOD. That's where I am stuck now.
     
  11. shmu26

    shmu26 Registered Member

    Joined:
    Jul 9, 2015
    Posts:
    1,550
    I booted into a linux distro, mounted the restored Win10 system in a file manager, and deleted Windows/System32/drivers.
    Then I pasted in the drivers folder from my working system.
    After this, the system slowly came back to life. Keyboard works, programs launch, the monitor has the right resolution, but... mouses don't work. Funny thing is, I have a gaming mouse with internal memory, and the programmed extra buttons work, but the primary buttons don't work, even on an ordinary mouse.
    I tried disconnecting a mouse and sticking it in a different usb outlet. I saw on the screen that Windows detected it and installed the driver. But the computer doesn't respond to the mouse. :confused:
     
    Last edited: Dec 26, 2019
  12. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,151
    Location:
    NSW, Australia
    shmu26,

    Nice work. You seem close to it working.

    I did a quick experiment. The computer BIOS was set to MBR options and Win10 was installed on a MBR disk. I used a TeraByte script to "Copy a Physical drive to a Virtual HD file". This created a .vhd file on HD1.

    All partitions on HD0 were deleted and a UEFI Win10 image was restored to HD0. The BIOS was set to UEFI options and BootIt UEFI was installed.

    A TeraByte script was used to "Copy a Virtual drive to a Physical drive". The option to Remove all installed drivers was used. Now I had a second Win10 on HD0.

    In BootIt, booting files were created in the ESP for the new Win10. A Boot Item was created in the Boot Menu for the new Win10. A BCD Edit was done for the new Win10.

    The new Win10 booted normally from the BootIt Boot Menu.

    Of interest, no backup images were required.

    In summary, a previous MBR Win10 vhd is now booting on HD0 in a UEFI system. There is only a single ESP in the system. ESPs on other disks can create bizarre issues.
     
  13. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,151
    Location:
    NSW, Australia
    Another test. Similar to what I suggested in Post #7.

    BootIt was uninstalled and all partitions on HD0 were deleted.
    The disk was changed to MBR type.
    A TeraByte script was used to "Copy a Virtual drive to a Physical drive". The option to Remove all installed drivers was used. Now I had a System Reserved Partition and a Win10 partition on HD0.
    The MBR disk was converted to GPT. Now I had MSR, ESP and Win10 partitions. A BCD Edit was not required.
    Win10 booted normally.
     
  14. shmu26

    shmu26 Registered Member

    Joined:
    Jul 9, 2015
    Posts:
    1,550
    @Brian K thanks for all your awesome help!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.