This guide covers creating and mounting virtual hard disks (VHD/VHDX) on Windows and macOS. You’ll learn how to set up a new virtual disk file, attach it to your system, and access it like a regular drive—useful for testing, storage, or running a second OS.
What You’ll Need
- Administrator privileges on your computer (Windows) or an admin user (macOS).
- Enough free space on your physical drive for the virtual disk file.
- Windows 7 or later, or macOS 10.13 or later (for built-in tools).
- No third-party software is required—both OSes have built-in tools.
Step-by-Step
On Windows (using Disk Management)
- Press Win + X and select Disk Management from the menu.
- In the top menu bar, click Action → Create VHD.
- Click Browse to choose where to save the .vhd or .vhdx file, and give it a name.
- Set the Virtual hard disk size (e.g., 50 GB).
- Choose VHDX format if you’re on Windows 8/10/11 (supports larger sizes and is more robust); choose VHD for older systems or maximum compatibility.
- Pick Fixed size (allocates all space immediately) or Dynamically expanding (grows as you use it). Fixed is faster but uses full space upfront.
- Click OK. The disk will be created and automatically attached as an uninitialized disk.
- Right-click the new disk (e.g., “Disk 2”) and select Initialize Disk. Choose GPT for modern systems or MBR for older ones, then click OK.
- Right-click the unallocated space and select New Simple Volume. Follow the wizard to assign a drive letter and format it (NTFS is typical).
- Once formatted, the virtual disk appears in File Explorer as a normal drive.
On Windows (Mounting an Existing VHD/VHDX)
- Open Disk Management (Win + X → Disk Management).
- Click Action → Attach VHD.
- Browse to your .vhd or .vhdx file and click OK.
- The disk appears as a new drive. If it’s already formatted, it will get a drive letter automatically.
- To detach later, right-click the disk (not the volume) and select Detach VHD.
On macOS (using Disk Utility)
- Open Disk Utility (Applications → Utilities).
- Click File → New Image → Blank Image.
- Name the file, choose a location, and set the size (e.g., 50 GB).
- Choose a format: APFS (default for modern macOS), Mac OS Extended (Journaled), or exFAT for cross-platform use.
- Select Partition as “Single partition – GUID Partition Map” (default).
- For Image Format, choose “sparse disk image” (grows as needed) or “read/write disk image” (fixed size).
- Click Save. The image is created and mounted automatically, appearing on the desktop.
- To unmount, right-click the icon and select Eject.
Common Mistakes
- Choosing VHD when you need VHDX – VHDX supports larger sizes (up to 64 TB) and is more crash-resistant. Use VHDX unless you need legacy compatibility.
- Not initializing the disk – After creating a VHD, you must initialize it (GPT/MBR) and create a volume; otherwise it shows as “Unknown” and “Not Initialized”.
- Forgetting to detach before deleting the file – If you delete a VHD file while it’s attached, you’ll get errors. Always detach first.
- Using the wrong partition scheme – MBR only supports up to 2 TB. If you need more, use GPT.
- Not leaving enough free space – A fixed-size VHD allocates the full size immediately. Ensure your physical drive has room.
Tips
- Use dynamically expanding VHDs for test environments to save space, but be aware performance may be slightly lower than fixed.
- Always keep a backup of the VHD file—it contains all your data.
- In Windows, you can also mount VHD files by right-clicking the .vhd file and selecting Mount (Windows 10/11).
- On macOS, you can create an encrypted disk image by choosing “AES-128” or “AES-256” encryption in the image format dropdown.
- If you need to transfer the VHD to another computer, just copy the file—it’s self-contained.
Troubleshooting
- “The disk is not initialized” – Right-click the disk in Disk Management and choose Initialize Disk. If the option is grayed out, make sure you’re an administrator.
- “The virtual disk is already in use” – Close any programs that might be using it (e.g., Explorer windows), or detach it from Disk Management first.
- Cannot see the new drive in File Explorer – Check Disk Management: if the disk is initialized but has no drive letter, right-click the volume and select Change Drive Letter and Paths.
- Mac image won’t mount – Try double-clicking the .dmg file. If it fails, open Disk Utility, click File → Open Disk Image, and select the file.
- VHD file is too large to copy – Use a compressed archive or split it (not directly supported). Consider using a dynamically expanding disk to keep the file smaller.
- “Access denied” when attaching – Run Disk Management as administrator (right-click → Run as administrator).
Frequently Asked Questions
Can I boot from a virtual hard disk?
Yes, Windows supports booting from a VHD or VHDX (native boot). You can set it up via the BCD (Boot Configuration Data) tool, but it’s an advanced procedure.
What’s the difference between VHD and VHDX?
VHD is the older format with a 2 TB limit and 512-byte sectors. VHDX supports up to 64 TB, 4K sectors, and has better crash protection. Use VHDX for new disks.
Can I mount a VHD on macOS?
macOS does not natively mount VHD/VHDX files. You can use third-party tools like VHDX Mount or convert the VHD to a DMG using a Windows machine.
Is a virtual hard disk the same as a virtual machine?
No. A virtual hard disk is just a file that acts as a storage device. A virtual machine is a full computer environment that uses one or more virtual disks.
Can I resize a virtual hard disk after creation?
Yes. In Windows, you can use the Expand VHD option in Disk Management (Action → Expand VHD) to increase the size. On macOS, you can resize a sparse image using Disk Utility’s Image → Resize.
How do I delete a virtual hard disk?
First detach it (Windows: right-click disk → Detach VHD; macOS: eject the image). Then delete the file from your drive. That’s it.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Fix Text Cursor Turning White in Windows 11
- Force Quit Non-Responding Apps on Mac: 6 Ways
- Chromebook Not Charging? Fix It Fast
- iPhone Won’t Make Calls but Texts Work? Fixes
- Android to iPhone Hotspot: Connect & Fix Issues
- Chrome Image Decode Failed Error: Fixes That Work