Skip to content

How-ToSSD

How to Create and Use a VHDX Virtual Disk in Windows 11

A VHDX virtual hard disk is a single file that Windows 11 treats like a real drive, with its own drive letter. Here's how to create, initialise, detach and reattach one in Disk Management, whether to choose fixed or dynamically expanding, and why VHDX beats the older VHD format.

By , Systems & Technical Editor

5 min read

How to Create and Use a VHDX Virtual Disk in Windows 11

A virtual hard disk (VHD) is a single file that Windows can treat exactly like a physical drive. Once it's attached, it shows up in Disk Management and File Explorer with its own drive letter, and you can format it, fill it with files and then detach it again, all without touching your real partitions. That makes it handy for keeping a project, a test environment or a self-contained set of files in one movable file.

VHD or VHDX?

Disk Management can create both formats, and Microsoft recommends .vhdx. VHDX was introduced with Hyper-V in Windows Server 2012 as the successor to the older VHD format, and Microsoft lists these main improvements:

VHD

VHDX

Maximum size

2,040GB for dynamic and differencing disks

Up to 64TB

Power-failure protection

Not offered (added with VHDX)

Logs updates to its metadata to protect against corruption

Large-sector disks

Not optimised (added with VHDX)

Better aligned for modern large-sector drives

Microsoft's recommendation

Use only when you need compatibility

Recommended

Both formats can hold standard file systems such as NTFS, FAT and exFAT, and every virtual disk has a minimum size of 3MB. Unless you need to open the file on something that only understands the old format, choose VHDX.

Fixed size or dynamically expanding?

When you create a virtual disk you'll be asked to choose its type:

  • Fixed size. The whole file is allocated on your real drive straight away, so a 100GB fixed disk uses 100GB from day one. Microsoft notes that a large fixed-size disk can take extra time to create.

  • Dynamically expanding. The file only uses as much space as the data inside it, growing as you add files. Microsoft warns that Windows doesn't check free space against the maximum size when you create one, so it's possible to make a dynamic disk larger than the free space you actually have. Keep an eye on the drive that holds the file.

Dynamically expanding is the sensible choice for most home users because it doesn't tie up space you aren't using yet. Choose fixed size if you want the space reserved up front.

What you need

  • An account in the Administrators (or Backup Operators) group, because Disk Management needs administrator permissions.

  • Enough free space on the drive where you'll store the file, especially for a fixed-size disk.

  • A folder to keep it in. Microsoft says the location must be a full path and can't be inside the \Windows folder.

Step 1: Create the VHDX

  1. Open the Start menu, search for Disk Management (it appears as Create and format hard disk partitions) and run it as administrator. You can also right-click Start and choose Disk Management.

  2. Open the Action menu and choose Create VHD.

  3. Next to Location, select Browse, pick the folder for the file, type a file name and set Save as type to **Virtual Disk files (.vhdx) Selt Save.

  4. Enter the Virtual hard disk size.

  5. Choose Dynamically expanding or Fixed size, then select OK.

Windows creates the file, and the new disk appears in Disk Management looking just like a physical disk. A blue disk icon means it's attached and available.

Step 2: Initialise and format it

A new virtual disk is empty, so it needs the same preparation as a brand-new SSD before File Explorer will show it:

  1. If Disk Management shows the new disk as not initialised, right-click its label on the left and choose Initialize Disk (Windows may also open the Initialize Disk dialog for you). Microsoft's default partition style is GPT, which is right for almost everyone.

  2. Right-click the Unallocated space and choose New Simple Volume.

  3. Accept the default size to use the whole disk, choose a drive letter and pick a file system, usually NTFS.

  4. Select Finish.

The disk now appears in File Explorer under its drive letter, and you can use it like any other drive. For more detail on these steps, see our guide on how to initialise a new SSD in Windows 11, and if you're unsure which file system to choose, read NTFS vs exFAT vs FAT32.

Step 3: Detach and reattach it

When you've finished with the disk, right-click its label in Disk Management, choose Detach VHD and select OK. Microsoft points out that detaching makes the disk unavailable but doesn't delete the file or any data on it. Its icon turns grey in Disk Management while it's detached.

To use it again, open Action > Attach VHD, select Browse, pick the .vhdx or .vhd file and select OK. The same option works for any existing virtual disk file, not just ones you created.

What VHDX files are good for

  • Keeping files together. A project, a game mod setup or a set of tools can live in one file that's easy to copy to another drive as a single item.

  • Testing. You can try out partitioning or formatting on a virtual disk instead of a real one.

  • Virtual machines. Microsoft says virtual hard disks are designed mainly for Hyper-V virtual machines. If that's what you're after, see our comparison of Windows Sandbox vs Hyper-V.

  • Dev Drive. Windows 11's Dev Drive feature can also live inside a virtual disk; our guide on how to set up a Dev Drive in Windows 11 covers it.

Remember that a virtual disk is only as safe as the physical drive it sits on. If that drive fails, the VHDX goes with it, so keep a backup of anything important.

Our verdict

Windows 11 can create a virtual disk without any extra software. Open Disk Management as an administrator, choose Action > Create VHD, save it as a VHDX and pick Dynamically expanding unless you want the space reserved up front. Then initialise it as GPT, create a simple NTFS volume and it behaves like any other drive. Detach it when you're done and reattach it whenever you need it. VHDX is a better choice than the older VHD format, with a far higher size limit and protection against corruption from power cuts.

The bottom line

Windows 11 can create a virtual disk without any extra software. Open Disk Management as an administrator, choose Action > Create VHD, save it as a VHDX and pick Dynamically expanding unless you want the space reserved up front. Then initialise it as GPT, create a simple NTFS volume and it behaves like any other drive. Detach it when you're done and reattach it whenever you need it. VHDX is a better choice than the older VHD format, with a far higher size limit and protection against corruption from power cuts.

Sources

  1. 01Microsoft Learn, Manage Virtual Hard Disks (VHD)
  2. 02Microsoft Learn, About VHD
  3. 03Microsoft Learn, Hyper-V Virtual Hard Disk Format Overview
  4. 04Microsoft Learn, Initialize New Disks

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

Best Samsung SSD 2026: Which 9100 Pro, 990 or 870 Drive Should You Buy?

Best Picks

Best Samsung SSD 2026: Which 9100 Pro, 990 or 870 Drive Should You Buy?

Samsung's SSD range covers the PCIe 5.0 9100 PRO, the PCIe 4.0 990 PRO, 990 EVO Plus and 990, and the 870 EVO and 870 QVO SATA drives. Using Samsung UK's official specs, we pick the right one for gaming PCs, PCIe 5.0 builds, laptops, older PCs and bulk storage, with speeds, DRAM, endurance and warranty compared.

Hannah Vance7 min

How to Stop Windows Update Hogging Your Bandwidth in Windows 11

How-To

How to Stop Windows Update Hogging Your Bandwidth in Windows 11

Windows 11 downloads updates, Store apps and other Microsoft content through Delivery Optimization. How to cap its download and upload bandwidth, choose local-network sharing, check Activity monitor and clear its cache.

Marcus Thorne6 min

The Best Free Network Troubleshooting Tools for Windows PCs in 2026

Best Picks

The Best Free Network Troubleshooting Tools for Windows PCs in 2026

Six free tools for tracking down lag, packet loss and slow home networks on a Windows PC: Windows' built-in pathping, Microsoft's TCPView, iperf3, Trippy, Wireshark and Nmap, with what each is best for, based on official documentation.

Hannah Vance8 min