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
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.
Open the Action menu and choose Create VHD.
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.
Enter the Virtual hard disk size.
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.
A new virtual disk is empty, so it needs the same preparation as a brand-new SSD before File Explorer will show it:
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.
Right-click the Unallocated space and choose New Simple Volume.
Accept the default size to use the whole disk, choose a drive letter and pick a file system, usually NTFS.
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.