HYPER-V VM convert to Physical machine - any easy way for V2P


  1. Posts : 11,247
    Windows / Linux : Arch Linux
       #1

    HYPER-V VM convert to Physical machine - any easy way for V2P


    Hi folks

    especially @Kari

    One thing with Virtual Machines created by VMware is that it's usually easy to create a physical machine environment from the guest W10 machine by using the various tools out there (V2P conversion).

    Even taking an image with Macrium and restoring it to a physical machine often works - not always 100% but many more times than fail !! You might have to repair boot a couple of times, install a couple of drivers and also set the VM to use UEFI boot rather than MBR but the process generally works.

    If you don't set the VM BIOS Firmware to use UEFI when initially creating the VM and you try to restore to a UEFI system the thing will fail BTW.

    I tried taking a Macrium image from a W10 PRO X64 VM created with HYPER-V and then after restoring I couldn't boot the restored system -- whatever I did - including creating UEFI partitions etc I'd get message "OOPS something went wrong" at boot.

    Anybody got a way of doing a V2P conversion from a HYPER-V VM. (Windows 10 X-64 Pro is the guest -- not an insider build either).

    Just another note to people who might want to test these scenarios --to avoid losing Windows activation when copying / moving a Windows VM to another host machine -at ist boot with VMware you will see a little dialog box saying "I copied it or I Moved it" before the boot of the VM starts. Choose I MOVED IT not I copied it and activation will be OK. Remember if doing this under the EULA you mustn't run more than 1 copy of the VM at the same time -- 1 machine whether physical or virtual = 1 license.

    This is legal but use it sensibly -- VM's are fine for testing and might want all sorts of different cases - obviously it's ridiculous to pay for say 20 licenses when you just use the VM for a few days or hours at a time.

    Cheers
    jimbo
      My Computer


  2. Posts : 17,661
    Windows 10 Pro
       #2

    This relatively simple method do not care if the original VM is BIOS / MBR partitioned (Generation 1 in Hyper-V), or UEFI / GPT partitioned (Generation 2).

    Mount the VHD / VHDX file in question on host. Check the drive letter its Windows partition got (if mounting a BIOS / MBR based VHD, Windows assigns a drive letter also to its System Reserved partition).

    On host, run elevated Command Prompt. Capture Windows image from VHD:

    dism /capture-image /imagefile:Z:\install.wim /capturedir:W:\ /name:"Win10" /compress:maximum

    Change path in /imagefile to where you want captured WIM file to be saved, change /capturedir drive letter to actual drive letter of Windows partition on mounted VHD.

    Now simply replace original install.wim on Windows 10 install USB with captured custom one, or deploy Windows to physical machine directly from your captured custom WIM file (Apply Windows Image using DISM Instead of Clean Install | Windows 10 Tutorials).

    Kari
      My Computer


  3. Posts : 15,480
    Windows10
       #3

    Kari said:
    This relatively simple method do not care if the original VM is BIOS / MBR partitioned (Generation 1 in Hyper-V), or UEFI / GPT partitioned (Generation 2).

    Mount the VHD / VHDX file in question on host. Check the drive letter its Windows partition got (if mounting a BIOS / MBR based VHD, Windows assigns a drive letter also to its System Reserved partition).

    On host, run elevated Command Prompt. Capture Windows image from VHD:

    dism /capture-image /imagefile:Z:\install.wim /capturedir:W:\ /name:"Win10" /compress:maximum

    Change path in /imagefile to where you want captured WIM file to be saved, change /capturedir drive letter to actual drive letter of Windows partition on mounted VHD.

    Now simply replace original install.wim on Windows 10 install USB with captured custom one, or deploy Windows to physical machine directly from your captured custom WIM file (Apply Windows Image using DISM Instead of Clean Install | Windows 10 Tutorials).

    Kari
    Of course, the above relies on the fact that Windows 10 is very good at resolving hardware drivers when restoring the vm image to the host.

    On older versions e.g. windows 7, you often had to sysprep the image first.

    With W10, sysprepping is rarely needed but sometimes it is needed.

    Actually, my laptop falls over every time when I use a vm image on the host as it never reconciles the amd sata controller.

    Sysprepping never helped here either.

    Guess what - good old Macrium Reflect Redeploy sorted things.

    I now actually use Macrium Redeploy first before booting into new host version the first time.

    It is not generally understood you do not have to have restored a Macrium backup to use Redeploy - it works on any installation it finds.

    It will even work on installations in a vhd but it took me a while to work out how to use Redeploy on a host vhd.

    Basically, when you boot into Macrium Reflect in winpe mode, you have to attach the host vhd first using diskpart by clicking on the MR command prompt first.
      My Computer


  4. Posts : 17,661
    Windows 10 Pro
       #4

    cereberus said:
    Actually, my laptop falls over every time when I use a vm image on the host as it never reconciles the amd sata controller.
    When I install Windows 10 as secondary OS for dual / multi boot, be it a physical install or on native boot VHD, I mount install.wim I am going to use on host main OS, export drivers from main OS and "inject" them to install.wim.

    DISM - Add or Remove Drivers on an Offline Image | Windows 10 Tutorials

    When I then deploy from this install.wim, it contains exactly the same drivers than current, main OS. Easiest and fasted method for issue-free deployment I know.

    Kari
      My Computer


  5. Posts : 15,480
    Windows10
       #5

    Kari said:
    When I install Windows 10 as secondary OS for dual / multi boot, be it a physical install or on native boot VHD, I mount install.wim I am going to use on host main OS, export drivers from main OS and "inject" them to install.wim.

    DISM - Add or Remove Drivers on an Offline Image | Windows 10 Tutorials

    When I then deploy from this install.wim, it contains exactly the same drivers than current, main OS. Easiest and fasted method for issue-free deployment I know.

    Kari
    Sure - I just noted @jimbo mentioned he sometimes got driver issues. This woukd solve them probably.

    However, personally as I have Macrium Reflect Home Redeploy option, I do not really need it as it only takes very little effort to sort drivers.
      My Computer


  6. Posts : 11,247
    Windows / Linux : Arch Linux
    Thread Starter
       #6

    Hi folks

    Thanks to you both

    I looked at the "Technicians USB" for Macrium that I have and it does have the redeploy feature @cereberus mentioned.

    That worked Thanks !!!

    It's not intuitive since you have to redploy the image after restoring ! but it works fine and booted OK -- got a couple of messages "Getting devices ready" then it booted into Windows just fine and Windows activated OK with digital licence (have some W10 VL copies).

    and thanks also to @Kari -- always appreciate answers from you both.

    Cheers
    jimbo
      My Computer


  7. Posts : 15,480
    Windows10
       #7

    jimbo45 said:
    Hi folks

    Thanks to you both

    I looked at the "Technicians USB" for Macrium that I have and it does have the redeploy feature @cereberus mentioned.

    That worked Thanks !!!

    It's not intuitive since you have to redploy the image after restoring ! but it works fine and booted OK -- got a couple of messages "Getting devices ready" then it booted into Windows just fine and Windows activated OK with digital licence (have some W10 VL copies).

    and thanks also to @Kari -- always appreciate answers from you both.

    Cheers
    jimbo
    The subtle point about redeploy is you do not even need to have restored a Macrium Image.

    Suppose you had a hard drive on one pc, and put it in a new one. Before you boot for the first time, booyt from a Macrium Reflect drive and run redeploy.

    Similarly, if you have a vhd in a vm, and attach to host, do the same (need to attach vhd from Macrium command prompt first).

    Redeploy is probably less useful now for W10 than earlier versions as W10 is very good at sorting drivers anyway.

    I just do it as a matter of course as it only takes a couple of minutes.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:45.
Find Us




Windows 10 Forums