How to Install and Boot Windows 11 from VHDX
Booting Windows 11 directly from a VHDX (Virtual Hard Disk v2) file enables you to run a fully functional secondary operating system on bare-metal hardware without repartitioning your physical drives. This guide covers how to create a dynamic VHDX, apply a clean Windows 11 installation image using the DISM command-line tool, and configure the Windows Boot Manager to enable dual-booting into the virtual drive.
Prerequisites
- An active Windows installation with Administrator privileges.
- A downloaded official Windows 11 ISO file.
- At least 64 GB of free storage on your physical drive.
Step 1: Create and Mount the VHDX File
Open the Start Menu, search for Command Prompt, right-click it, and select Run as administrator.
Launch the disk partitioning tool:
diskpartCreate a folder to store the VHDX (e.g.,
C:\VHD) and execute the following commands to create and mount a dynamically expanding 64 GB virtual disk:create vdisk file="C:\VHD\Windows11.vhdx" maximum=65536 type=expandable select vdisk file="C:\VHD\Windows11.vhdx" attach vdisk create partition primary format fs=ntfs quick label="Win11_VHDX" assign letter=V exit
Step 2: Extract and Apply the Windows 11 Image
Double-click your downloaded Windows 11 ISO to mount it. Note the assigned drive letter (for this example, assume drive
E:).Check the available Windows editions inside the image file by running:
dism /Get-WimInfo /WimFile:E:\sources\install.wim(Note: If your ISO uses
install.esd, replaceinstall.wimwithinstall.esd.)Identify the index number corresponding to your desired edition (e.g., Windows 11 Pro is commonly Index
6).Apply the image directly to your mounted VHDX drive (
V:):dism /Apply-Image /ImageFile:E:\sources\install.wim /Index:6 /ApplyDir:V:\Wait for the progress bar to reach 100%.
Step 3: Add the VHDX to the Windows Boot Menu
Update the Boot Configuration Data (BCD) store to recognize the new Windows installation:
V:\Windows\System32\bcdboot V:\WindowsOnce the command returns
Boot files successfully created, detach the VHDX by returning to Diskpart:diskpart select vdisk file="C:\VHD\Windows11.vhdx" detach vdisk exit
Step 4: Boot into the Secondary Windows 11 System
- Restart your PC.
- When the blue boot selection screen appears, choose the newly added Windows 11 entry.
- Complete the standard Out-of-Box Experience (OOBE) setup, such as region, keyboard layout, user account creation, and network configuration.
The secondary Windows 11 operating system will now run directly from the VHDX container while accessing your physical CPU, GPU, and system RAM with native performance.