__
_______ ______ ____ ___ / /_
/ ___/ / / / __ \/ __ \/ _ \/ __ \
/ / / /_/ / / / / /_/ / __/ / / /
/_/ \__,_/_/ /_/\____/\___/_/ /_/
I recently wrote up a light guide after experimenting with using VHDX disks to dual-boot different instances of Windows 11 to test various things without the limitation of working inside of a Hyper-V virtual machine. Maybe this will help someone looking to do the same.
Convert-WindowsImage -SourcePath .\win11_pro.iso -VHDFormat VHDX -SizeBytes 128GB -VHDPath .\Windows11_Pro_x64_Bootable.vhdx -Edition "Windows 11 Pro" -DiskLayout UEFI -BCDinVHD NativeBoot
bcdboot <drive letter>:\Windowsbcdboot F:\Windowsbcdedit /videntifier GUID for entry with device of vhd=[<driveletter>:]\bcdedit /set <identifier> description "Windows 11 – VHDX Boot"bcdedit /set {bd67a0a8-a586-11e6-bf4e-bc8385086e7d} description "Windows 11 PTIT – VHDX"bcdedit /vhypervisorlaunchtype auto under non VHDX entry.
bcdedit /set hypervisorlaunchtype automsconfigmsconfig command.(\Windows) (without a drive letter).If you see a "Performance Options" dialog window on every boot to desktop, or are unable to configure a pagefile, the below will configure a floating pagefile on the unencrypted host volume.
regedit as admin.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PagefileOnOsVolume DWORD entry to 0TempPageFile DWORD entry if present.If the Native Boot VM has enforcement of Bitlocker encryption via something such as Intune, the automatically mounted volume where the VHDX is stored must be dismounted to meet compliance.
diskmgmt.mscDue to running within a mounted VHDX, the 9P filesystem protocol used by WSL2 suffers from instability/extremely poor performance. The emulated filesystem of WSL1 is not impacted. To convert an installed distro to WSL1, the following command can be utilized:
wsl --set-version <distroname> 1