Windows 10: Reusing vhdx (native boot) in Hyper-V

Discus and support Reusing vhdx (native boot) in Hyper-V in Windows 10 Virtualization to solve the problem; Hey all, I created a .vhdx in disk management, initialised, new volume and formatted. Deployed Win 10 Insider 17754 to it using dism /apply-image etc.... Discussion in 'Windows 10 Virtualization' started by Seymour Bhutz, May 28, 2020.

  1. Reusing vhdx (native boot) in Hyper-V


    Hey all, I created a .vhdx in disk management, initialised, new volume and formatted. Deployed Win 10 Insider 17754 to it using dism /apply-image etc. Updated the bcd store on main OS, booted to .vhdx natively no issues. Now since MSoft doesn't allow the upgrade to newer builds for vhd's I wanted to attach the .vhdx to a virtual machine in Hyper-V (on my main install obviously) and then perform the upgrade process. Tried creating a gen 2 machine, attached the .vhdx, didn't boot. Tried attaching an .iso of the Win10 install also, still didn't boot. Created a gen 1 machine, with both .vhdx and .iso attached, it booted from the .iso but said no disk drive was detected/installed. I tried using the repair computer option, setup couldn't repair it, so loaded up command prompt used diskpart, it picked up the drive, marked the current partition active, and tried to manually enter the following commands: bootrec /fixmbr (successful) bootrec /fixboot (fail) said something like access denied bootrec /rebuildbcd (success) Restarted the VM in Hyper-V still not booting from the attached .vhdx nor did the install from .iso detect the drive either. Any suggestions as to how I can boot from the vhdx and upgrade the windows installation to build 17760 and then reuse the same .vhdx to boot natively? Regards

    :)
     
    Seymour Bhutz, May 28, 2020
    #1
  2. Greg70 Win User

    Reusing vhdx (native boot) in Hyper-V

    Hello Kari,
    I did looked at your tutorial “Native boot Virtual Hard Disk - How to upgrade Windows” on tenforums wich is very interesting as I have been stuck with this issue but I couldn’t make it work.
    I tried both methods with on both the same issue.
    The issue seems to be that my vhdx disk is a GPT which boots fine natively but here when I try it doesn’t boot at all as a non UEFI file system.
    I then tried to create a EFI partition which allowed me to boot normally on hyper-v but without being able to update as seen as virtual like when I boot normally without hyper-v.
    I converted then my vhdx to MBR but then I got a black screen when launching with a constant CPU at 4%. So no way to boot even MBR with hyper-v.
    Now I’m really stuck. If you have any ideas of what I could try it’s more than welcome as I use my vhdx as a real computer so not easy to reinstall from scratch.
    Best Regards
    Greg

    - - - Updated - - -

    I finally converted my vhdx to MBR but then I got a blinking cursor when launching and got stuck whatever I tried in cmd line.
    So I created a new fat32 partition with boot records and I managed to boot on hyper-v.

    Reusing vhdx (native boot) in Hyper-V [​IMG]


    But it seems this way didn’t trick windows update and I got stuck again.

    Reusing vhdx (native boot) in Hyper-V [​IMG]

    If you have any ideas of what I could try it’s more than welcome

    - - - Updated - - -

    I read that you use this method to get insider preview builds installed. Could the fact i'm trying to install the latest official iso version from MediaCreationTool1909.exe be the problem here ?

    - - - Updated - - -

    Finally I got it working. The final touch was to change PortableOperatingSystem to 0 in regedit to allow installation.

    - - - Updated - - -

    In fact I said it too fast and got a new error !!!

    Reusing vhdx (native boot) in Hyper-V [​IMG]
     
    Greg70, May 29, 2020
    #2
  3. Reusing vhdx (native boot) in Hyper-V

    Hey all,

    I created a .vhdx in disk management, initialised, new volume and formatted.

    Deployed Win 10 Insider 17754 to it using dism /apply-image etc. Updated the bcd store on main OS, booted to .vhdx natively no issues.

    Now since MSoft doesn't allow the upgrade to newer builds for vhd's I wanted to attach the .vhdx to a virtual machine in Hyper-V (on my main install obviously) and then perform the upgrade process.

    Tried creating a gen 2 machine, attached the .vhdx, didn't boot. Tried attaching an .iso of the Win10 install also, still didn't boot.

    Created a gen 1 machine, with both .vhdx and .iso attached, it booted from the .iso but said no disk drive was detected/installed.

    I tried using the repair computer option, setup couldn't repair it, so loaded up command prompt used diskpart, it picked up the drive, marked the current partition active, and tried to manually enter the following commands:

    bootrec /fixmbr (successful)
    bootrec /fixboot (fail) said something like access denied
    bootrec /rebuildbcd (success)

    Restarted the VM in Hyper-V still not booting from the attached .vhdx nor did the install from .iso detect the drive either.

    Any suggestions as to how I can boot from the vhdx and upgrade the windows installation to build 17760 and then reuse the same .vhdx to boot natively?

    Regards
     
    Seymour Bhutz, May 29, 2020
    #3
  4. Reusing vhdx (native boot) in Hyper-V

    Reusing vhdx (native boot) in Hyper-V

    Thanks for the suggestion.

    I created a new machine in hyper-v, tried to install the latest insider builds but it wouldn't boot from them either. Only 17134.1 iso worked. So I installed that instead to get the correct vhdx configuration. However it took 1hr20mins!

    Tried imaging using macrium, at this point I was fed up with waiting and the time element. Thought there must be an easier way.

    Checked the structure of 17134.1 vhdx created in hyper-v, it contained EFI, Windows and Recovery partitions.

    Remembered you stating something about my previous vhdx not having correct boot files.
    (17760 only contained windows partition, no EFI, MSR or Recovery)

    So created a new vhdx (A1) within disk manager, used diskpart following instructions on MSoft website as guidance and adapted to my configuration. https://docs.microsoft.com/en-us/win...ive-partitions

    Deployed .wim to the windows (WReusing vhdx (native boot) in Hyper-V :) partition (A1) and applied bcdboot (from A1) to the EFI (SReusing vhdx (native boot) in Hyper-V :) partition on the vhdx (A1). Attached this vhdx (A1) to vm in hyper-v and booted successfully *Biggrin (Tip, rename the EFI to something like "SystemVHD or SysVHD" to avoid confusion)

    https://docs.microsoft.com/en-us/win...-the-boot-menu

    However, I had an existing vhdx (A2) with build 17760 deployed using dism and installed apps that I wanted to keep then boot in hyper-v to perform the upgrade to 17763. Obviously couldn't create EFI partition since there was one main partition starting from the beginning of the vhdx (A2).

    So I created a new vhdx (A3), 1gb (disk management complains about minimum size for gpt drive), gpt, made EFI and MSR partitions, and while the build 17760 vhdx (A2) was mounted in explorer I used bcdboot (from 17760 vhdx (A2)) to write boot files to this recent EFI (SReusing vhdx (native boot) in Hyper-V :)(A3).

    Ejected both drives, mounted the EFI vhdx (A3) as SCSI (0) and the 17760 vhdx (A2) as SCSI (1), made sure boot order was EFI (A3) first, 17760 (A2) second in the firmware section of vm properties and managed to boot successfully *Biggrin

    Insider upgrade using win update and also from attached iso both initiated and proceeded to install without error.

    Due to the slowness of VM I decided its much quicker to deploy wim to vhdx with each new build and go through setup process than inplace upgrade. Tried a few tweaks in VM to allocate more cores and RAM made a noticeable difference but performance still far below VHD native boot not to mention that I have had enough of hyper-v and VMs.

    Thanks again.
     
    Seymour Bhutz, May 29, 2020
    #4
Thema:

Reusing vhdx (native boot) in Hyper-V

Loading...
  1. Reusing vhdx (native boot) in Hyper-V - Similar Threads - Reusing vhdx native

  2. Native VHDX boot - Windows won't use a pagefile

    in Windows 10 Software and Apps
    Native VHDX boot - Windows won't use a pagefile: Right now I'm booting off of a VHDX file natively. Works great, except no matter what I do, Windows won't create or use a page file! I did some research, and unlike when the VHDX is booted in Hyper-V, native VHDX boot won't put hiberfil.sys, pagefile.sys, and swapfile.sys on...
  3. How to boot into bootable differencing vhdx in Hyper-V

    in Windows 10 Virtualization
    How to boot into bootable differencing vhdx in Hyper-V: Hello, I am trying to upgrade my boot to VHD VHDX to the latest Windows 10 update using this terrific tutorial from @Kari: Native boot Virtual Hard Disk - How to upgrade Windows However, I am having trouble getting the vhdx to boot in Hyper-V. Everything seems to work as...
  4. Native booting vhdx file not working

    in Windows 10 Virtualization
    Native booting vhdx file not working: I've been trying to native boot Win10 on a vhdx virtual disk. I'm following this guide: You are being redirected.... Everything seems to work as it should. But when I reboot the system the following error is shown: [img] I'm testing this in a VMWare VM with UEFI boot and...
  5. Is it possible to native boot a vhdx after dual booting linux?

    in Windows 10 Virtualization
    Is it possible to native boot a vhdx after dual booting linux?: I want to install linux on a separate nvme and still boot natively to vhdx's that I will add to the windows boot manager with one normal windows on a separate nvme. Is this possible or does grub completely replace the windows boot manager altogether. 144144
  6. Is it possible to native boot a vhdx after dual booting linux?

    in Windows 10 Installation and Upgrade
    Is it possible to native boot a vhdx after dual booting linux?: I want to install linux on a separate nvme and still boot natively to vhdx's that I will add to the windows boot manager with one normal windows on a separate nvme. Is this possible or does grub completely replace the windows boot manager altogether. 144144
  7. Reusing vhdx (native boot) in Hyper-V

    in Windows 10 Installation and Upgrade
    Reusing vhdx (native boot) in Hyper-V: Hey all, I created a .vhdx in disk management, initialised, new volume and formatted. Deployed Win 10 Insider 17754 to it using dism /apply-image etc. Updated the bcd store on main OS, booted to .vhdx natively no issues. Now since MSoft doesn't allow the upgrade to newer...
  8. Hyper-v guest internet connection lost after booting as VHDX.

    in Windows 10 Virtualization
    Hyper-v guest internet connection lost after booting as VHDX.: Hello, I am running Windows 10 Pro (10240) and have a guest Windows 10 VM (10528) which were working fine. Both were activated and connected to internet correctly. Today I booted the VM as native boot VHDX. This installed some drivers, connected to internet and...
  9. Can't native boot Hyper-V generation 2 vhdx

    in Windows 10 Virtualization
    Can't native boot Hyper-V generation 2 vhdx: If I create a generation 1 VM I can native boot the vhdx by adding bcd entry. If I make a generation 2 VM it fails with "a required device isn't connected...0xc0000225". Pressing f8 for "Startup Settings" gives "The application or operating system couldn't be loaded because a...
  10. Hyper-V - Native Boot VHD

    in Windows 10 Tutorials
    Hyper-V - Native Boot VHD: How to: Hyper-V - Native Boot VHD [img] Information First a quote from Microsoft Developer Network's (MSDN) support article: Native Boot allows you to create a virtual hard disk (VHD), install Windows to it, and then boot it up, either on your PC side-by-side with...