Virtualization Native Boot Windows 11 Virtual Hard Disk (VHDX)


Drive_banner.png

This tutorial will show you how to boot a Windows 11 VHDX file natively to dual boot with Windows 10 or Windows 11.

Native Boot allows you to create a virtual hard disk (VHDX), install Windows to it, and then boot it up, either on your PC side-by-side with your existing installation, or on a new device.

A native-boot VHDX can be used as the running operating system on designated hardware without any other parent operating system. This differs from a scenario where a VHDX is connected to a virtual machine on a computer that has a parent operating system.

Native boot for Windows 11 requires the .vhdx format, not the .vhd format.

VHDXs can be applied to PCs or devices that have no other installations of Windows, without a virtual machine or hypervisor. (A hypervisor is a layer of software under the operating system that runs virtual computers.) This enables greater flexibility in workload distribution because a single set of tools can be used to manage images for virtual machines and designated hardware.

You must be signed in as an administrator to setup and Native Boot a Windows 11 VHDX file.

The Windows 11 VHDX file used in this tutorial was created with a Hyper-V Windows 11 virtual machine, and copied to the OS to dual boot with.



EXAMPLE: Dual boot Windows 10 with a Native Boot Windows 11 VHDX

Native_boot_Windows11_VHDX.png




Here's How:

1 Copy the Windows 11 VHDX file where you want to keep it saved at to the Windows OS you want to dual boot with.

2 Open Disk Management (diskmgmt.msc).

3 In Disk Management, click/tap on Action on the menu bar, and click/tap on Attach VHD. (see screenshot below)

Native_boot_Windows11_VHDX-1.png

4 Perform the following steps to select the Windows 11 VHDX file to attach: (see screenshot below)
  1. Click/tap on Browse.
  2. Navigate to and select the VHDX file.
  3. Click/tap on Open.
  4. Click/tap on OK.
Native_boot_Windows11_VHDX-1B.png

5 Right click on the middle "Healthy (Basic Data Partition)" for the attached VHDX, and click/tap on Change Drive Letter and Paths. (see screenshot below)

If a drive letter has already been assigned to the attached Windows 11 VHDX, then jump to step 8 instead.


Native_boot_Windows11_VHDX-2.png

6 Click/tap on Add. (see screenshot below)

Native_boot_Windows11_VHDX-3.png

7 Select (dot) Assign the following drive letter, select an available drive letter (ex: "F") you want to assign, and click/tap on OK. (see screenshot below)

Native_boot_Windows11_VHDX-4.png

8 The Windows 11 VHDX file will now be mounted as a drive with the drive letter (ex: "F") you selected to assign to it. (see screenshots below)

Native_boot_Windows11_VHDX-5.png
Native_boot_Windows11_VHDX-6.png
Native_boot_Windows11_VHDX-7.png

9 You can now close Disk Management if you like.

10 Open an elevated Windows Terminal, and select Command Prompt.

11 Type the command below you want to use into the elevated command prompt, and press Enter. (see screenshot below)

(Keep current OS default at boot)
bcdboot <drive letter>:\Windows /d

OR

(Make VHDX the default OS at boot)
bcdboot <drive letter>:\Windows

This command will add the attached Windows 11 VHDX to the boot manager to dual boot.

Substitute <drive letter> in the command above with the actual drive letter (ex: "F") of the attached Windows 11 VHDX.

For example: bcdboot F:\Windows


Native_boot_Windows11_VHDX-8.png

12 You can now close the elevated command prompt.

13 The next time you boot or restart the computer, you can select to boot from Windows 11 (VHDX) or Windows 10 (installed OS).


That's it,
Shawn Brink


 
Last edited:
Hey mate,

Check to make sure the host volume where the VHD is located has enough free space. You might need to free up some space if it’s running low.

Hello Shawn,

I have 165 GB of free space on the host volume. How much more would you estimate I need?

Please advise. Thanks in advance.

Kind regards,

tecknot
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 build 26300.9725Intel i7 8750H @ 2.2 GHz16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC...Intel UHD Graphics 630 & NVIDIA Quadro P600
    OS
    Windows 11 Pro 25H2 build 26300.9725
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad Workstation P72
    CPU
    Intel i7 8750H @ 2.2 GHz
    Motherboard
    Lenovo 01YU291
    Memory
    16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3
    Graphics Card(s)
    Intel UHD Graphics 630 & NVIDIA Quadro P600
    Sound Card
    Realtek ALC3286 & Focusrite Saffire 24 Pro DSP
    Monitor(s) Displays
    17.3"
    Screen Resolution
    3840x2160
    Hard Drives
    1TB SSD Samsung 860 EVO SATA 3
    1TB SSD Samsung 970 EVO M.2 NVMe PCIe 3 x 4
    2TB SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
    PSU
    230W
    Cooling
    fan
    Keyboard
    UltraNav
    Mouse
    Kensington wireless Orbit
    Internet Speed
    640Mbps
    Browser
    DuckDuckGo and Firefox
    Antivirus
    Defender
    Other Info
    CM246 Chipset
  • VM with Windows 11 26H2 b 26300.9725: 4 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3; 150GB on SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
Hello Shawn,

I have 165 GB of free space on the host volume. How much more would you estimate I need?

Please advise. Thanks in advance.

Kind regards,

tecknot

That should be enough as long as it's bigger than the mounted VHD. How much free space do you have on the VHD?
 

My Computers My Computers

  • At a glance

    Windows 11 Pro for WorkstationsIntel i7-8700K 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GD...
    OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    TerraMaster F8 SSD Plus NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Amazon Basics Wired Full Keyboard MD005
    Mouse
    Logitech MX Master 4
    Internet Speed
    2 Gbps Download and 100 Mbps Upload
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • At a glance

    Windows 11 ProSnapdragon X Elite (12 core) 3.42 GHz16 GB LPDDR5x-7467 MHz
    Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
That should be enough as long as it's bigger than the mounted VHD. How much free space do you have on the VHD?

Just under 20 GB.
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 build 26300.9725Intel i7 8750H @ 2.2 GHz16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC...Intel UHD Graphics 630 & NVIDIA Quadro P600
    OS
    Windows 11 Pro 25H2 build 26300.9725
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad Workstation P72
    CPU
    Intel i7 8750H @ 2.2 GHz
    Motherboard
    Lenovo 01YU291
    Memory
    16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3
    Graphics Card(s)
    Intel UHD Graphics 630 & NVIDIA Quadro P600
    Sound Card
    Realtek ALC3286 & Focusrite Saffire 24 Pro DSP
    Monitor(s) Displays
    17.3"
    Screen Resolution
    3840x2160
    Hard Drives
    1TB SSD Samsung 860 EVO SATA 3
    1TB SSD Samsung 970 EVO M.2 NVMe PCIe 3 x 4
    2TB SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
    PSU
    230W
    Cooling
    fan
    Keyboard
    UltraNav
    Mouse
    Kensington wireless Orbit
    Internet Speed
    640Mbps
    Browser
    DuckDuckGo and Firefox
    Antivirus
    Defender
    Other Info
    CM246 Chipset
  • VM with Windows 11 26H2 b 26300.9725: 4 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3; 150GB on SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4

My Computers My Computers

  • At a glance

    Windows 11 Pro for WorkstationsIntel i7-8700K 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GD...
    OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    TerraMaster F8 SSD Plus NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Amazon Basics Wired Full Keyboard MD005
    Mouse
    Logitech MX Master 4
    Internet Speed
    2 Gbps Download and 100 Mbps Upload
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • At a glance

    Windows 11 ProSnapdragon X Elite (12 core) 3.42 GHz16 GB LPDDR5x-7467 MHz
    Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
Oops. I mean that's how much space the .vhdx is taking up. I can't tell how much space is on the VHD itself. Are we talking virtual memory?
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 build 26300.9725Intel i7 8750H @ 2.2 GHz16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC...Intel UHD Graphics 630 & NVIDIA Quadro P600
    OS
    Windows 11 Pro 25H2 build 26300.9725
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad Workstation P72
    CPU
    Intel i7 8750H @ 2.2 GHz
    Motherboard
    Lenovo 01YU291
    Memory
    16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3
    Graphics Card(s)
    Intel UHD Graphics 630 & NVIDIA Quadro P600
    Sound Card
    Realtek ALC3286 & Focusrite Saffire 24 Pro DSP
    Monitor(s) Displays
    17.3"
    Screen Resolution
    3840x2160
    Hard Drives
    1TB SSD Samsung 860 EVO SATA 3
    1TB SSD Samsung 970 EVO M.2 NVMe PCIe 3 x 4
    2TB SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
    PSU
    230W
    Cooling
    fan
    Keyboard
    UltraNav
    Mouse
    Kensington wireless Orbit
    Internet Speed
    640Mbps
    Browser
    DuckDuckGo and Firefox
    Antivirus
    Defender
    Other Info
    CM246 Chipset
  • VM with Windows 11 26H2 b 26300.9725: 4 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3; 150GB on SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
Oops. I mean that's how much space the .vhdx is taking up. I can't tell how much space is on the VHD itself. Are we taking virtual memory?

You could do a quick mount of the VHD to see.

 

My Computers My Computers

  • At a glance

    Windows 11 Pro for WorkstationsIntel i7-8700K 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GD...
    OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    TerraMaster F8 SSD Plus NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Amazon Basics Wired Full Keyboard MD005
    Mouse
    Logitech MX Master 4
    Internet Speed
    2 Gbps Download and 100 Mbps Upload
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • At a glance

    Windows 11 ProSnapdragon X Elite (12 core) 3.42 GHz16 GB LPDDR5x-7467 MHz
    Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
I will enlarge my VHD space.

Thanks a lot, Shawn. I appreciate it.

Kind regards,

tecknot
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 build 26300.9725Intel i7 8750H @ 2.2 GHz16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC...Intel UHD Graphics 630 & NVIDIA Quadro P600
    OS
    Windows 11 Pro 25H2 build 26300.9725
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad Workstation P72
    CPU
    Intel i7 8750H @ 2.2 GHz
    Motherboard
    Lenovo 01YU291
    Memory
    16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3
    Graphics Card(s)
    Intel UHD Graphics 630 & NVIDIA Quadro P600
    Sound Card
    Realtek ALC3286 & Focusrite Saffire 24 Pro DSP
    Monitor(s) Displays
    17.3"
    Screen Resolution
    3840x2160
    Hard Drives
    1TB SSD Samsung 860 EVO SATA 3
    1TB SSD Samsung 970 EVO M.2 NVMe PCIe 3 x 4
    2TB SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
    PSU
    230W
    Cooling
    fan
    Keyboard
    UltraNav
    Mouse
    Kensington wireless Orbit
    Internet Speed
    640Mbps
    Browser
    DuckDuckGo and Firefox
    Antivirus
    Defender
    Other Info
    CM246 Chipset
  • VM with Windows 11 26H2 b 26300.9725: 4 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3; 150GB on SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4

My Computers My Computers

  • At a glance

    Windows 11 Pro for WorkstationsIntel i7-8700K 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GD...
    OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    TerraMaster F8 SSD Plus NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Amazon Basics Wired Full Keyboard MD005
    Mouse
    Logitech MX Master 4
    Internet Speed
    2 Gbps Download and 100 Mbps Upload
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • At a glance

    Windows 11 ProSnapdragon X Elite (12 core) 3.42 GHz16 GB LPDDR5x-7467 MHz
    Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
You could do a quick mount of the VHD to see.


Okay, I got 150GB
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 build 26300.9725Intel i7 8750H @ 2.2 GHz16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC...Intel UHD Graphics 630 & NVIDIA Quadro P600
    OS
    Windows 11 Pro 25H2 build 26300.9725
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad Workstation P72
    CPU
    Intel i7 8750H @ 2.2 GHz
    Motherboard
    Lenovo 01YU291
    Memory
    16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3
    Graphics Card(s)
    Intel UHD Graphics 630 & NVIDIA Quadro P600
    Sound Card
    Realtek ALC3286 & Focusrite Saffire 24 Pro DSP
    Monitor(s) Displays
    17.3"
    Screen Resolution
    3840x2160
    Hard Drives
    1TB SSD Samsung 860 EVO SATA 3
    1TB SSD Samsung 970 EVO M.2 NVMe PCIe 3 x 4
    2TB SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
    PSU
    230W
    Cooling
    fan
    Keyboard
    UltraNav
    Mouse
    Kensington wireless Orbit
    Internet Speed
    640Mbps
    Browser
    DuckDuckGo and Firefox
    Antivirus
    Defender
    Other Info
    CM246 Chipset
  • VM with Windows 11 26H2 b 26300.9725: 4 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3; 150GB on SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4

My Computers My Computers

  • At a glance

    Windows 11 Pro for WorkstationsIntel i7-8700K 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GD...
    OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    TerraMaster F8 SSD Plus NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Amazon Basics Wired Full Keyboard MD005
    Mouse
    Logitech MX Master 4
    Internet Speed
    2 Gbps Download and 100 Mbps Upload
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • At a glance

    Windows 11 ProSnapdragon X Elite (12 core) 3.42 GHz16 GB LPDDR5x-7467 MHz
    Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 build 26300.9725Intel i7 8750H @ 2.2 GHz16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC...Intel UHD Graphics 630 & NVIDIA Quadro P600
    OS
    Windows 11 Pro 25H2 build 26300.9725
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad Workstation P72
    CPU
    Intel i7 8750H @ 2.2 GHz
    Motherboard
    Lenovo 01YU291
    Memory
    16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3
    Graphics Card(s)
    Intel UHD Graphics 630 & NVIDIA Quadro P600
    Sound Card
    Realtek ALC3286 & Focusrite Saffire 24 Pro DSP
    Monitor(s) Displays
    17.3"
    Screen Resolution
    3840x2160
    Hard Drives
    1TB SSD Samsung 860 EVO SATA 3
    1TB SSD Samsung 970 EVO M.2 NVMe PCIe 3 x 4
    2TB SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
    PSU
    230W
    Cooling
    fan
    Keyboard
    UltraNav
    Mouse
    Kensington wireless Orbit
    Internet Speed
    640Mbps
    Browser
    DuckDuckGo and Firefox
    Antivirus
    Defender
    Other Info
    CM246 Chipset
  • VM with Windows 11 26H2 b 26300.9725: 4 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3; 150GB on SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
Could be cutting it close with 150GB mounted VHD on a host 165 GB drive.

High again, Shawn.

Okay, I am getting it now. How can I shrink the VHD so the host can have more space?

Kind regards,

tecknot
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 build 26300.9725Intel i7 8750H @ 2.2 GHz16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC...Intel UHD Graphics 630 & NVIDIA Quadro P600
    OS
    Windows 11 Pro 25H2 build 26300.9725
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad Workstation P72
    CPU
    Intel i7 8750H @ 2.2 GHz
    Motherboard
    Lenovo 01YU291
    Memory
    16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3
    Graphics Card(s)
    Intel UHD Graphics 630 & NVIDIA Quadro P600
    Sound Card
    Realtek ALC3286 & Focusrite Saffire 24 Pro DSP
    Monitor(s) Displays
    17.3"
    Screen Resolution
    3840x2160
    Hard Drives
    1TB SSD Samsung 860 EVO SATA 3
    1TB SSD Samsung 970 EVO M.2 NVMe PCIe 3 x 4
    2TB SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
    PSU
    230W
    Cooling
    fan
    Keyboard
    UltraNav
    Mouse
    Kensington wireless Orbit
    Internet Speed
    640Mbps
    Browser
    DuckDuckGo and Firefox
    Antivirus
    Defender
    Other Info
    CM246 Chipset
  • VM with Windows 11 26H2 b 26300.9725: 4 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3; 150GB on SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
High again, Shawn.

Okay, I am getting it now. How can I shrink the VHD so the host can have more space?

Kind regards,

tecknot

Is this a VHD or VHDX file?

A VHD file cannot be shrunk directly; only VHDX files support shrinking via Resize-VHD command.

 

My Computers My Computers

  • At a glance

    Windows 11 Pro for WorkstationsIntel i7-8700K 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GD...
    OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    TerraMaster F8 SSD Plus NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Amazon Basics Wired Full Keyboard MD005
    Mouse
    Logitech MX Master 4
    Internet Speed
    2 Gbps Download and 100 Mbps Upload
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • At a glance

    Windows 11 ProSnapdragon X Elite (12 core) 3.42 GHz16 GB LPDDR5x-7467 MHz
    Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Microsoft Defender
Is this a VHD or VHDX file?

A VHD file cannot be shrunk directly; only VHDX files support shrinking via Resize-VHD command.


Excellent! It is a .vhdx. I'm on my way to Microsoft Learn.

Kind regards

tecknot
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 build 26300.9725Intel i7 8750H @ 2.2 GHz16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC...Intel UHD Graphics 630 & NVIDIA Quadro P600
    OS
    Windows 11 Pro 25H2 build 26300.9725
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad Workstation P72
    CPU
    Intel i7 8750H @ 2.2 GHz
    Motherboard
    Lenovo 01YU291
    Memory
    16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3
    Graphics Card(s)
    Intel UHD Graphics 630 & NVIDIA Quadro P600
    Sound Card
    Realtek ALC3286 & Focusrite Saffire 24 Pro DSP
    Monitor(s) Displays
    17.3"
    Screen Resolution
    3840x2160
    Hard Drives
    1TB SSD Samsung 860 EVO SATA 3
    1TB SSD Samsung 970 EVO M.2 NVMe PCIe 3 x 4
    2TB SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
    PSU
    230W
    Cooling
    fan
    Keyboard
    UltraNav
    Mouse
    Kensington wireless Orbit
    Internet Speed
    640Mbps
    Browser
    DuckDuckGo and Firefox
    Antivirus
    Defender
    Other Info
    CM246 Chipset
  • VM with Windows 11 26H2 b 26300.9725: 4 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3; 150GB on SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
Oops. I mean that's how much space the .vhdx is taking up. I can't tell how much space is on the VHD itself. Are we talking virtual memory?
Could be cutting it close with 150GB mounted VHD on a host 165 GB drive.

When you boot a dynamic (expanding) .vhdx you require enough free space on the drive holding the .vhdx for it to expand to its full size while Windows is running from it.

Do you have a large external usb drive with more than 150GB free space available?

Unlike a conventional Windows install you can native boot a .vhdx that's on an external drive (preferably an SSD).
 

My Computers My Computers

  • At a glance

    Windows 11 HomeAMD Athlon Silver 3050U8GBRadeon Graphics
    OS
    Windows 11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Acer Aspire 3 A315-23-R9VY
    CPU
    AMD Athlon Silver 3050U
    Memory
    8GB
    Graphics Card(s)
    Radeon Graphics
    Monitor(s) Displays
    laptop screen
    Screen Resolution
    1366x768 native resolution, up to 2560x1440 with Radeon Virtual Super Resolution
    Hard Drives
    1TB Samsung EVO 870 SSD (from April 2026: 250GB EVO 850)
    Internet Speed
    150 Mbps
    Browser
    Edge, Firefox
    Antivirus
    Defender
    Other Info
    UPDATE - 11 April 2026: due to lid hinges starting to break up this laptop has been retired from active duty. The OS with all software and files has been migrated to my System Seven in 'Other systems' to carry on as my general purpose 'main machine'.

    I've now clean installed 25H2 and used Garlin's scripts to update Secure Boot to CA 2023 and revoke the PCA 2011 certificates. It's new role is to test secure boot issues.

    Info for 2021-2026:
    fully 'Windows 11 ready' laptop. Windows 10 C: partition migrated from my old unsupported 'main machine' then upgraded to 11. A test migration ran Insider builds for 2 months. When 11 was released on 5th October 2021 it was re-imaged back to 10 and was offered the upgrade in Windows Update on 20th October. Windows Update offered the 22H2 Feature Update on 20th September 2022. It got the 23H2 Feature Update on 4th November 2023 through Windows Update, 24H2 on 3rd October 2024 through Windows Update by setting the Target Release Version for 24H2, and 25H2 on 30th September 2025 through Windows Update by setting the Target Release Version for 25H2.
  • At a glance

    Windows 11 ProIntel® Core™ i5-520M8GB(integrated graphics) Intel HD Graphics
    Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Dell Latitude E4310
    CPU
    Intel® Core™ i5-520M
    Motherboard
    0T6M8G
    Memory
    8GB
    Graphics card(s)
    (integrated graphics) Intel HD Graphics
    Screen Resolution
    1366x768
    Hard Drives
    500GB Crucial MX500 SSD
    Browser
    Firefox, Edge
    Antivirus
    Defender
    Other Info
    unsupported machine: Legacy bios, MBR, TPM 1.2, upgraded from W10 to W11 using W10/W11 hybrid install media workaround.

    In-place upgrade to 22H2 using ISO and a workaround.
    Feature Update to 23H2 by manually installing the Enablement Package.
    In-place upgrade to 24H2 using hybrid 23H2/24H2 install media.
    Upgraded to 25H2 by Enablement Package.
    Upgraded to 26H2 by Enablement Package.

    Also running Insider Experimental 263xx and 29xxx builds and Windows 10 as native boot .vhdx.
  • My SYSTEM THREE is a Dell Latitude 5410, i7-10610U, 32GB RAM, 512GB NVMe ssd, supported device running Windows 11 Pro.

    My SYSTEM FOUR was a 2-in-1 convertible Lenovo Yoga 11e (1st gen) type 20DA, Celeron N2930, 8GB RAM, 256GB ssd. Unsupported device. This has now been sold. It has been replaced by my System Eight.

    My SYSTEM FIVE is a Dell Latitude 3190 2-in-1, Pentium Silver N5030, 8GB RAM, 1TB NVMe ssd, supported device running Windows 11 Pro, plus Insider Beta, Experimental 263xx and 29xxx builds (and a few others) as a native boot .vhdx.

    My SYSTEM SIX is a Dell Latitude 5550, Core Ultra 7 165H, 64GB RAM, 1TB NVMe SSD, supported device, Windows 11 Pro, Hyper-V host machine. Updated to 25H2 on 30th September 2025, 26H2 on 29th September 2026.

    My SYSTEM SEVEN is a Lenovo Thinkpad T580, 1920x1080 touchscreen, Intel Core i7-8650U, 16GB RAM, 512GB NVMe SSD + 2nd 512GB NVMe SSD, a supported device for Windows 11. This is my current general purpose 'main machine'. The installed Windows 11 Home from my System One has been migrated to this machine. As its new home has an existing digital licence for Pro I've been able to upgrade the migrated OS from Home to Pro.
    29 Sept. 2026 Feature Update to 26H2 through Windows Update.

    My SYSTEM EIGHT is a 2-in-1 convertible Lenovo Yoga 11e (5th gen) type 20LN, Celeron N4120, 8GB RAM, 512GB NVMe ssd, a supported device for Windows 11. Currently running Windows 11 Pro, plus Insider Beta, Experimental 263xx and 29xxx builds as native boot vhdx.
Actuall vhdx file sizes can be misleading. A vhdx file may take up say 50 GB space on a drive.

Hiwever, when you load up the vhdx file by native booting it, you find windows allegedly only occupies say 40 GB.

So what is this? The problem is used data sectors that are no longer needed e.g. if you deleted a bunch of files, as far as native booting from windows vhdx that deleted data is invisible and not counted.

However that deleted data still exists so at the host OS windows level, it is part of the size of the vhdx.

Unfortunately, there is no easy way to recover that space in a vhdx and after updates, the real storage grows and grows but from inside native booted windows the logical size is smaller.

The upshot of this a vhdx can inexplicably run out of space even though the logical size suggests adequate space.

Unfortunately none of the vhdx compacting commands really work effectively.

I use a brute force method to reclaim the space by creating a new blank vhdx file and clone the vhdx with the space that needs to be freed to the blank vhdx. Then the physical vhdx file matches the logical size. Then deleted source vhdx and rename newly cloned vhdx.
 

My Computer My Computer

At a glance

Windows 11 Pro + Win11 Canary VM.I9 13th gen i9-13900H 2.60 GHZ16 GB solderedIntegrated Intel Iris XE
OS
Windows 11 Pro + Win11 Canary VM.
Computer type
Laptop
Manufacturer/Model
ASUS Zenbook 14
CPU
I9 13th gen i9-13900H 2.60 GHZ
Motherboard
Yep, Laptop has one.
Memory
16 GB soldered
Graphics Card(s)
Integrated Intel Iris XE
Sound Card
Realtek built in
Monitor(s) Displays
laptop OLED screen
Screen Resolution
2880x1800 touchscreen
Hard Drives
1 TB NVME SSD (only weakness is only one slot)
PSU
Internal + 65W thunderbolt USB4 charger
Case
Yep, got one
Cooling
Stella Artois (UK pint cans - 568 ml) - extra cost.
Keyboard
Built in UK keybd
Mouse
Bluetooth , wireless dongled, wired
Internet Speed
900 mbs (ethernet), wifi 6 typical 350-450 mb/s both up and down
Browser
Edge
Antivirus
Defender
Other Info
TPM 2.0, 2xUSB4 thunderbolt, 1xUsb3 (usb a), 1xUsb-c, hdmi out, 3.5 mm audio out/in combo, ASUS backlit trackpad (inc. switchable number pad)

Macrium Reflect Home V8
Office 365 Family (6 users each 1TB onedrive space)
Hyper-V (a vm runs almost as fast as my older laptop)
The problem is used data sectors that are no longer needed e.g. if you deleted a bunch of files, as far as native booting from windows vhdx that deleted data is invisible and not counted.

However that deleted data still exists so at the host OS windows level, it is part of the size of the vhdx.

Unfortunately, there is no easy way to recover that space in a vhdx and after updates, the real storage grows and grows but from inside native booted windows the logical size is smaller.

The upshot of this a vhdx can inexplicably run out of space even though the logical size suggests adequate space.

Unfortunately none of the vhdx compacting commands really work effectively.

I use a brute force method to reclaim the space by creating a new blank vhdx file and clone the vhdx with the space that needs to be freed to the blank vhdx. Then the physical vhdx file matches the logical size. Then deleted source vhdx and rename newly cloned vhdx.
I use another method to reclaim the space, one that you once proposed for compacting Hyper-V vhdx files.

Mount the .vhdx. Open an Admin Terminal, then (using the drive letter of the mounted vhdx) use the commands:
defrag <drive letter:> /v /u

Perform traditional defrag (this is the default).
/U | /PrintProgress Print the progress of the operation on the screen.
/V | /Verbose Print verbose output containing the fragmentation statistics.


defrag <drive letter:> /v /u /k

/K | /SlabConsolidate On thinly provisioned volumes, perform slab consolidation to increase slab usage efficiency.


Diskpart
In Diskpart use the commands:
Select vdisk file=<full path to .vhdx>
Detach vdisk
Compact vdisk

I run my Insider builds as native boot .vhdx, and I've just had to compact them after today's updates.

Mounted .vhdx drives:
1793399076411.webp


Sizes before compacting:
1793399104881.webp


...and after compacting:
1793407532736.webp
 

My Computers My Computers

  • At a glance

    Windows 11 HomeAMD Athlon Silver 3050U8GBRadeon Graphics
    OS
    Windows 11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Acer Aspire 3 A315-23-R9VY
    CPU
    AMD Athlon Silver 3050U
    Memory
    8GB
    Graphics Card(s)
    Radeon Graphics
    Monitor(s) Displays
    laptop screen
    Screen Resolution
    1366x768 native resolution, up to 2560x1440 with Radeon Virtual Super Resolution
    Hard Drives
    1TB Samsung EVO 870 SSD (from April 2026: 250GB EVO 850)
    Internet Speed
    150 Mbps
    Browser
    Edge, Firefox
    Antivirus
    Defender
    Other Info
    UPDATE - 11 April 2026: due to lid hinges starting to break up this laptop has been retired from active duty. The OS with all software and files has been migrated to my System Seven in 'Other systems' to carry on as my general purpose 'main machine'.

    I've now clean installed 25H2 and used Garlin's scripts to update Secure Boot to CA 2023 and revoke the PCA 2011 certificates. It's new role is to test secure boot issues.

    Info for 2021-2026:
    fully 'Windows 11 ready' laptop. Windows 10 C: partition migrated from my old unsupported 'main machine' then upgraded to 11. A test migration ran Insider builds for 2 months. When 11 was released on 5th October 2021 it was re-imaged back to 10 and was offered the upgrade in Windows Update on 20th October. Windows Update offered the 22H2 Feature Update on 20th September 2022. It got the 23H2 Feature Update on 4th November 2023 through Windows Update, 24H2 on 3rd October 2024 through Windows Update by setting the Target Release Version for 24H2, and 25H2 on 30th September 2025 through Windows Update by setting the Target Release Version for 25H2.
  • At a glance

    Windows 11 ProIntel® Core™ i5-520M8GB(integrated graphics) Intel HD Graphics
    Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Dell Latitude E4310
    CPU
    Intel® Core™ i5-520M
    Motherboard
    0T6M8G
    Memory
    8GB
    Graphics card(s)
    (integrated graphics) Intel HD Graphics
    Screen Resolution
    1366x768
    Hard Drives
    500GB Crucial MX500 SSD
    Browser
    Firefox, Edge
    Antivirus
    Defender
    Other Info
    unsupported machine: Legacy bios, MBR, TPM 1.2, upgraded from W10 to W11 using W10/W11 hybrid install media workaround.

    In-place upgrade to 22H2 using ISO and a workaround.
    Feature Update to 23H2 by manually installing the Enablement Package.
    In-place upgrade to 24H2 using hybrid 23H2/24H2 install media.
    Upgraded to 25H2 by Enablement Package.
    Upgraded to 26H2 by Enablement Package.

    Also running Insider Experimental 263xx and 29xxx builds and Windows 10 as native boot .vhdx.
  • My SYSTEM THREE is a Dell Latitude 5410, i7-10610U, 32GB RAM, 512GB NVMe ssd, supported device running Windows 11 Pro.

    My SYSTEM FOUR was a 2-in-1 convertible Lenovo Yoga 11e (1st gen) type 20DA, Celeron N2930, 8GB RAM, 256GB ssd. Unsupported device. This has now been sold. It has been replaced by my System Eight.

    My SYSTEM FIVE is a Dell Latitude 3190 2-in-1, Pentium Silver N5030, 8GB RAM, 1TB NVMe ssd, supported device running Windows 11 Pro, plus Insider Beta, Experimental 263xx and 29xxx builds (and a few others) as a native boot .vhdx.

    My SYSTEM SIX is a Dell Latitude 5550, Core Ultra 7 165H, 64GB RAM, 1TB NVMe SSD, supported device, Windows 11 Pro, Hyper-V host machine. Updated to 25H2 on 30th September 2025, 26H2 on 29th September 2026.

    My SYSTEM SEVEN is a Lenovo Thinkpad T580, 1920x1080 touchscreen, Intel Core i7-8650U, 16GB RAM, 512GB NVMe SSD + 2nd 512GB NVMe SSD, a supported device for Windows 11. This is my current general purpose 'main machine'. The installed Windows 11 Home from my System One has been migrated to this machine. As its new home has an existing digital licence for Pro I've been able to upgrade the migrated OS from Home to Pro.
    29 Sept. 2026 Feature Update to 26H2 through Windows Update.

    My SYSTEM EIGHT is a 2-in-1 convertible Lenovo Yoga 11e (5th gen) type 20LN, Celeron N4120, 8GB RAM, 512GB NVMe ssd, a supported device for Windows 11. Currently running Windows 11 Pro, plus Insider Beta, Experimental 263xx and 29xxx builds as native boot vhdx.
When you boot a dynamic (expanding) .vhdx you require enough free space on the drive holding the .vhdx for it to expand to its full size while Windows is running from it.

Do you have a large external usb drive with more than 150GB free space available?

Unlike a conventional Windows install you can native boot a .vhdx that's on an external drive (preferably an SSD).
Hi Bree,

Can I install it on a USB flash drive?

Kind regards,

tecknot
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 build 26300.9725Intel i7 8750H @ 2.2 GHz16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC...Intel UHD Graphics 630 & NVIDIA Quadro P600
    OS
    Windows 11 Pro 25H2 build 26300.9725
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad Workstation P72
    CPU
    Intel i7 8750H @ 2.2 GHz
    Motherboard
    Lenovo 01YU291
    Memory
    16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3
    Graphics Card(s)
    Intel UHD Graphics 630 & NVIDIA Quadro P600
    Sound Card
    Realtek ALC3286 & Focusrite Saffire 24 Pro DSP
    Monitor(s) Displays
    17.3"
    Screen Resolution
    3840x2160
    Hard Drives
    1TB SSD Samsung 860 EVO SATA 3
    1TB SSD Samsung 970 EVO M.2 NVMe PCIe 3 x 4
    2TB SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
    PSU
    230W
    Cooling
    fan
    Keyboard
    UltraNav
    Mouse
    Kensington wireless Orbit
    Internet Speed
    640Mbps
    Browser
    DuckDuckGo and Firefox
    Antivirus
    Defender
    Other Info
    CM246 Chipset
  • VM with Windows 11 26H2 b 26300.9725: 4 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3; 150GB on SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
I use another method to reclaim the space, one that you once proposed for compacting Hyper-V vhdx files.

Mount the .vhdx. Open an Admin Terminal, then (using the drive letter of the mounted vhdx) use the commands:
defrag <drive letter:> /v /u

Perform traditional defrag (this is the default).
/U | /PrintProgress Print the progress of the operation on the screen.
/V | /Verbose Print verbose output containing the fragmentation statistics.


defrag <drive letter:> /v /u /k

/K | /SlabConsolidate On thinly provisioned volumes, perform slab consolidation to increase slab usage efficiency.


Diskpart
In Diskpart use the commands:
Select vdisk file=<full path to .vhdx>
Detach vdisk
Compact vdisk

I run my Insider builds as native boot .vhdx, and I've just had to compact them after today's updates.

Mounted .vhdx drives:
View attachment 188349

Sizes before compacting:
View attachment 188350

...and after compacting:
View attachment 188354

Hi Bree,

Are these VMs (.vhdxs) on HDD or SSD? I have only SSD. Do I want to run a defrag on a SSD?

Please advise. Thanks in advance.

Kind regards,

tecknot
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 build 26300.9725Intel i7 8750H @ 2.2 GHz16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC...Intel UHD Graphics 630 & NVIDIA Quadro P600
    OS
    Windows 11 Pro 25H2 build 26300.9725
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkPad Workstation P72
    CPU
    Intel i7 8750H @ 2.2 GHz
    Motherboard
    Lenovo 01YU291
    Memory
    16 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3
    Graphics Card(s)
    Intel UHD Graphics 630 & NVIDIA Quadro P600
    Sound Card
    Realtek ALC3286 & Focusrite Saffire 24 Pro DSP
    Monitor(s) Displays
    17.3"
    Screen Resolution
    3840x2160
    Hard Drives
    1TB SSD Samsung 860 EVO SATA 3
    1TB SSD Samsung 970 EVO M.2 NVMe PCIe 3 x 4
    2TB SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
    PSU
    230W
    Cooling
    fan
    Keyboard
    UltraNav
    Mouse
    Kensington wireless Orbit
    Internet Speed
    640Mbps
    Browser
    DuckDuckGo and Firefox
    Antivirus
    Defender
    Other Info
    CM246 Chipset
  • VM with Windows 11 26H2 b 26300.9725: 4 GB (all Samsung) DDR4-3200 SODIMM (non-ECC) PCIe 3; 150GB on SSD Samsung 990 PRO M.2 NVMe PCIe 3 x 4
Back
Top Bottom