capture WIM image of KVM W10 VM for convert to physical (V2P)

Page 2 of 2 FirstFirst 12

  1. Posts : 1,325
    Windows 11 Pro 64-bit
       #11

    Good enough!


    So it works.
      My Computers


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

    Hopachi said:
    Good enough!


    So it works.
    I'm off to the pub this afternoon (Iceland is open for business !!! ) Fortunately here COVID hasn't been such a disaster and Nordic health systems work very well (in spite of taxation levels that most USA citizens would probably scream about !!!).

    So will try later -- I think I can see "The Winning Line" now.

    The other thing also - for updates it's easier to test on a VM then if it works capture the image and then apply to physical machines at will.

    Cheers
    jimbo
      My Computer


  3. Posts : 1,325
    Windows 11 Pro 64-bit
       #13

    @jimbo45
    OK, enjoy!

    I'll try that WIM capturing later as well.

    Will keep an eye on the thread for further developments.
    The slipstreaming remains interesting to try out.
      My Computers


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

    Hopachi said:
    @jimbo45
    OK, enjoy!

    I'll try that WIM capturing later as well.

    Will keep an eye on the thread for further developments.
    The slipstreaming remains interesting to try out.

    Hi folks

    1) simply mounting the ISO and going into install Windows where you can manually install driver (via load driver) doesn't give you an opportunity to get into command mode after driver has been loaded - and if you exit a re-boot hasn't loaded the drivers.

    2) so next step is to create a SATA RAW disk for the Virtual Windows machine

    3) Run Diskpart to create GPT disk, format it NTFS and assign.

    4) Clone the running VIRTIO disk to the new SATA virtual Disk.

    5) see if the cloned Disk boots if it does then you can if you want delete the VIRTIO HDD.

    6) See if the Windows ISO on boot into command mode sees the SATA disk (note the VIRTIO drivers are already installed anyway from the OLD Windows system via the cloning process.

    7) Try and capture the image.

    Currently on Step 6 now

    capture WIM image of KVM W10  VM for convert to physical (V2P)-screenshot_20210513_095810.png

    capture WIM image of KVM W10  VM for convert to physical (V2P)-screenshot_20210513_100137.png

    Here's booting the standard Windows ISO in command mode (Repair computer etc) - it recognises the SATA RAW Virtual disk where the Windows VM is stored. I've removed the original VIRTIO to avoid any "cross contamination" or accidentally using wrong files. (After the convert to physical I will restore the VIRTIO disk as it performs better (as it was intended to do !!).

    capture WIM image of KVM W10  VM for convert to physical (V2P)-screenshot_20210513_102526.png

    Now to try and capture the image.

    Update:

    Capture Image appears to be working -- boot device is the Win ISO ("X") where I'm running the DISM command from, Disk C is the Windows VM SATA Disk and device G is the target of my capture device a 64 GB HP USB stick formatted NTFS (and GPT) . Note capture image will take quite a long time on a slowish device like a USB stick -- probably better to use an external SSD drive !!! but there's a prob with the SABRENT SATA->USB hardware when attempting to attach this as a USB device. It can be done by attaching to HOST and then defining that as a physical device in the VM - might do that later if the USB stick method takes too long !!

    capture WIM image of KVM W10  VM for convert to physical (V2P)-screenshot_20210513_124022.png

    then next step afterwards is to boot the ISO on a physical machine, Apply the image and the bcd boot and test if I get anywhere with boot !!!!

    If that all works then I'll proceed to the final stage of injecting the drivers to the ISO via slipstream.

    Should keep me out of mischief for the rest of the afternoon. !!!!

    Now the acid test !!!

    This will be the "Make or Break situation.

    capture WIM image of KVM W10  VM for convert to physical (V2P)-screenshot_20210513_174152.png

    Copy of course the WIM file to a Windows NTFS / FAT32 system. Boot the Windows ISO install up and get into command mode (On of course on a physical machine) and then apply the image to appropriate disk. Then run the BCD command to get the Boot on to the image and then attempt to boot it.

    Going OK so far,

    Next installment tomorrow !!! as doing other things tonight.

    Note -- whatever VM software you use V2P (Virtual to Physical) is a lot more complex that the other way around P2V - Phyiscal to Virtual). Hopefully a load of Forum users here will also have a bit of fun with this project. !!!


    Cheers
    jimbo
    Last edited by jimbo45; 13 May 2021 at 12:07. Reason: added screenshot of booting from Install ISO
      My Computer


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

    Hi folks

    Success !!

    To get the BOOT file to be transferred correctly you need to boot from a current physical version of a Windows HDD and then run the BCD boot for example : where F: is your target Windows.

    If running from a VM I think the bcdboot takes the VM BIOS's boot or UEFI file (from OVMF) which will fail "OOPS something went wrong ..." message if creating bcdboot that way and then trying to boot on a physical machine.

    bcdboot C:\Windows /s F: /f UEFI where C: is a REAL Windows system and F: the EFI partition on the target Windows system.

    Success for the V2P conversion. Now I need to test to see if I can install from the modified ISO image so I need now to slipstream drivers into the ISO. Although now having a proper physical image that's not so problematical if it gets too complex as the V2P thing works so I can upgrade / install as a VM then transfer to physical machine as and when required. Still want to do it though to prove its possible.

    Update :

    @Hopachi

    Success - I cheated though by after applying the image to the target device I needed to get the boot to work via bootcd - so I used Macrium stand alone bootable recovery (made from a running physical version of windows - not from the one inside the original VM) and running "Repair / Fix Windows boot problems". The issue was that booting from the Windows install via the cmdline from the ISO kept flagging the EFI partition on the target device as "Hidden".

    My target was to create this on a Windows to go drive and I created the Macrium stand alone recovery from a previous Windows to go system I had created (from a physical system not from inside a VM). I then used Macrium's "Fix / Repair Windows boot problems" from the stand alone recovery.

    BTW after ist boot of the system there were a load of hardware updates you need to apply - however system does boot even though the video was "Ms Basic".

    You need to find a normal physical running version of Windows and update a load of "Unknown devices" etc from Device manager by installing / updating and pointing to the Windows directory (from a running Windows system) D:Windows\System32\DriverStore\FileRepository

    Then everything OK

    Mission accomplished -- have now my Win2Go system on a nice fast external SSD created from the QEMU/KVM Virtual machine.

    A bit long winded - but I'm happy it now works .

    I'm even posting this from the Win2GO I've created from my VM. No need to install all my apps again and all email accounts working normally (address books etc etc OK too).

    The Win2Go system performs absolutely flawlessly and is faster (by far) than the Windows system that's native to this machine but installed on an old PC HDD (2.5 in).

    Now to try and "Automate this a bit better" --if people want I can try and make a Tut of it too.

    If I can get all those drivers slipstreamed into the iso this might install without needing the Macrium stand alone recovery. However I think I don't really need a generalised ISO as if I can get a basic system to boot then this should work on pretty well any hardware so long as you have the current Windows disks for installing drivers and being able to update your system.

    Remember I was trying to create a Windows2Go system from a VM - if you want to do the conversion on a system on internal HDD's then the bootcd problem might not exist.

    Cheers
    jimbo
    Last edited by jimbo45; 17 May 2021 at 08:56. Reason: Successfully accomplished creating physical Win2Go from the VM
      My Computer


  6. Posts : 1,325
    Windows 11 Pro 64-bit
       #16

    Nice work, @jimbo45.

    Good to note this post of yours for future reference.

    I wonder if V2P conversion alone could be easier to do just with Macrium (Reflect, home edition in particular).
    I've done a couple of simple conversions with M. Reflect and so far most work pretty well. In my cases the hardware change was detected and coped with on the fly.

    Win10 (as Win8.1) should be able to detect and cope with the hardware changes during first boot. What you noted about the boot issue is important since it will not always boot depending on UEFI/BIOS move.
    If you restore the backup in a VM or on another host, you just need to bare in mind the virtio (in case of your VM) controller is switched (like in your post) to sata/ide first, using the available disk controller on destination system.

    Just in case some extra info, if needed, like we used to do this with Win7, use Paragon P2P. Great tutorial at SevenForums.
    This works for P2P as written, but also usable for P2V, V2P and V2V (for instance like from Hyper-V to KVM, or backwards)
    You restore the backup on physical disk in another VM or another host but then if you swap PC / motherboard, all should work if the disk controller is available (as driver) in installed system.
      My Computers


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

    Hopachi said:
    Nice work, @jimbo45.

    Good to note this post of yours for future reference.

    I wonder if V2P conversion alone could be easier to do just with Macrium (Reflect, home edition in particular).
    I've done a couple of simple conversions with M. Reflect and so far most work pretty well. In my cases the hardware change was detected and coped with on the fly.

    Win10 (as Win8.1) should be able to detect and cope with the hardware changes during first boot. What you noted about the boot issue is important since it will not always boot depending on UEFI/BIOS move.
    If you restore the backup in a VM or on another host, you just need to bare in mind the virtio (in case of your VM) controller is switched (like in your post) to sata/ide first, using the available disk controller on destination system.

    Just in case some extra info, if needed, like we used to do this with Win7, use Paragon P2P. Great tutorial at SevenForums.
    This works for P2P as written, but also usable for P2V, V2P and V2V (for instance like from Hyper-V to KVM, or backwards)
    You restore the backup on physical disk in another VM or another host but then if you swap PC / motherboard, all should work if the disk controller is available (as driver) in installed system.
    Hi there
    it might not work if you use the Stand alone Macrium re-covery if that was created within the VM as its possible the boot manager might use the UEFI file from the "VM's" BIOS rather than the physical machine. You will need after booting the macrium stand alone recovery to run "Fix Windows boot problems".

    It could be that if you create the recovery program from within the VM when it builds the WIM it depends on whether it creates one from your Windows VM or from some Real version of Windows.

    I'll test this out over the weekend -- see what happens.

    remember the object is also to get it to work on a Win2Go type external Disk !!!
    Cheers
    jimbo
      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 20:26.
Find Us




Windows 10 Forums