How to attach and split VHD and VHDX files in Windows 10

Attach and split VHD and VHDX files in Windows 10

General information

VHD (Virtual Hard Disk) is a file format that represents a virtual hard drive (HDD).It may contain everything that can be found on a physical hard drive, such as disk partitions and a file system, which can also contain files and folders in turn.It is often used as the hard disk of a virtual machine.

VHDX is Hyper-V virtual hard disk file format.VHDX has storage capacity of up to 64 TB, much larger than the 2TB limit on the older VHD format.It also provides data loss protection during power outages and optimizes the discrete disk architectures to prevent performance degradation on new and large physical drives. .

  1. Here's how to create a Virtual Hard Disk on Windows 10

When you mount .vhd or .vhdx files, these files will be added as drives in the PC.

This tutorial will show you different ways to attach and separate virtual hard disk files VHD and VHDX in Windows 10.

Attention:

  1. You must log in as an administrator to be able to attach or split VHD and VHDX files.
  2. Cannot attach VHD and VHDX files from media that are not formatted with NTFS file systems or ReFS.

EXAMPLE: The VHDX file is attached to a computer named This PC:

How to attach and split VHD and VHDX files in Windows 10 Picture 1How to attach and split VHD and VHDX files in Windows 10 Picture 1

How to attach and split VHD and VHDX files in Windows 10

  1. General information
  2. Attach VHD or VHDX files directly
  3. Attach VHD or VHDX files in Disk Management
  4. Attach VHD or VHDX files in Windows PowerShell
  5. Use Eject to separate VHD or VHDX files
  6. Split VHD and VHDX files by restarting the computer
  7. Separate VHD and VHDX files in Disk Management
  8. Separate VHD or VHDX files in Windows PowerShell

Attach VHD or VHDX files directly

Do one of the following:

1. Double click the .vhd or .vhdx file.Need to attach.

2. Right-click or click and hold the .vhd or .vhdx file and click Mount (see screenshot below).

How to attach and split VHD and VHDX files in Windows 10 Picture 2How to attach and split VHD and VHDX files in Windows 10 Picture 2

Attach VHD or VHDX files in Disk Management

1. Open Disk Management (diskmgmt.msc).

2. Click or tap the Action tab in the menu bar and click / click Attach VHD.(see screenshot below)

How to attach and split VHD and VHDX files in Windows 10 Picture 3How to attach and split VHD and VHDX files in Windows 10 Picture 3

3. Click Browse, navigate to and select the .vhd or .vhdx file, then click Open, select or deselect Read-only and click OK (see screenshot below).

How to attach and split VHD and VHDX files in Windows 10 Picture 4How to attach and split VHD and VHDX files in Windows 10 Picture 4

4. Now you can close Disk Management if you want.

Attach VHD or VHDX files in Windows PowerShell

Attention:

  1. For more details and options for Mount-VHD cmdlet, see: Microsoft Documents: Mount-VHD
  2. This command is only available after installing the Hyper-V feature.

1. Open Windows PowerShell.

2. Enter the following command into Windows PowerShell and press Enter (see screenshot below).

 Mount-VHD -Path "full path of file.vhd or .vhdx" 

Attention:

  1. Replace the full path of file.vhd or .vhdx in the sample command with the actual full path of the .vhd or .vhdx file you want to attach.

How to attach and split VHD and VHDX files in Windows 10 Picture 5How to attach and split VHD and VHDX files in Windows 10 Picture 5

3. You can now close Windows PowerShell if you want.

Use Eject to separate VHD or VHDX files

1. Open File Explorer on the device.

2. Right-click or click and hold on the drive where you have attached the .vhd file or.Click Eject (see screenshot below).

How to attach and split VHD and VHDX files in Windows 10 Picture 6How to attach and split VHD and VHDX files in Windows 10 Picture 6

Split VHD and VHDX files by restarting the computer

Restart the computer to automatically split at the same time all attached VHD and VHDX files.

Separate VHD and VHDX files in Disk Management

1. Open Disk Management (diskmgmt.msc).

2. Right-click or click and hold on disc # for .vhd or .vhdx files attached and click on Detach VHD (see screenshot below).

How to attach and split VHD and VHDX files in Windows 10 Picture 7How to attach and split VHD and VHDX files in Windows 10 Picture 7

3. Click OK to confirm (see screenshot below).

How to attach and split VHD and VHDX files in Windows 10 Picture 8How to attach and split VHD and VHDX files in Windows 10 Picture 8

4. Now you can close Disk Management if you want.

Separate VHD or VHDX files in Windows PowerShell

Attention:

  1. For more details and options for the Dismount-VHD command, see: Microsoft Documents: Dismount-VHD
  2. This command is only available after installing the Hyper-V feature.

1. Open Windows PowerShell.

2. Enter the commands below into Windows PowerShell and press Enter after each command.Make a note of the drive file # or file of the .vhd or .vhdx file that you want to disconnect (see screenshot below).

 Diskpart 

vdisk list

exit

How to attach and split VHD and VHDX files in Windows 10 Picture 9How to attach and split VHD and VHDX files in Windows 10 Picture 9

3. Perform step 4 (drive #) or step 5 (path) to know how to split the file .vhd or .vhdx.

4. Use drive # in PowerShell to separate VHD or VHDX files

Type the following command into Windows PowerShell, press Enter and go to step 6 below (see screenshot below).

 Dismount-VHD -DiskNumber # 

Note:

Replace # in the above command by the number of the actual drive (example: 2) from step 2 above.

For example:

 Dismount-VHD -DiskNumber 2 

How to attach and split VHD and VHDX files in Windows 10 Picture 10How to attach and split VHD and VHDX files in Windows 10 Picture 10

5. Use the file path in PowerShell to extract VHD or VHDX files

Type the following command into Windows PowerShell, press Enter and go to step 6 below (see screenshot below).

 Dismount-VHD -Path "full path of file .vhd or .vhdx" 

Note

Replace the full path of the .vhd or .vhdx file in the above command with the actual file path from step 2 above.

For example:

 Dismount-VHD -Path "C: UsersBrinkDesktopNon-InsiderW10.vhdx" 

How to attach and split VHD and VHDX files in Windows 10 Picture 11How to attach and split VHD and VHDX files in Windows 10 Picture 11

6. You can now close Windows PowerShell if you want.

See more:

  1. Turn off Windows Defender on Windows 10
  2. 7 ways to turn off Windows 10 laptop screen
  3. How to turn off the history of opening applications in Windows 10
  4. How to reset Touchpad settings on Windows 10?
4.5 ★ | 26 Vote