logo
ComputerHow to Create, Mount, Unmount and Convert VHD/VHDX

How to Create, Mount, Unmount and Convert VHD/VHDX

By Michael | Last Updated

VHD, the abbreviation of Virtual Hard Disk, which allows multiple operating systems to run on a host machine. Furthermore, VHDX is the new format of VHD. The maximum capacity it supports is 2048 GB while the VHDX is up to 64 TB. In this tutorial, we will show you how to create, mount, unmount and convert VHD/VHDX. Here is how to do:

create mount unmount convert vhd vhdx

Part 1: How to Create a VHD/VHDX in Windows 10.

You can set up a VHD or VHDX via Disk Management or Hyper-V Manager.

Way 1: Create VHD/VHDX via Hyper-V Manager

Step 1: Click on Cortana search box at the lower-left corner and type Hyper-V Manager then hit Enter to open it.

Step 2: Make sure you don't select any virtual machines. Click on ActionNew > Hard Disk then you only need to follow the wizard to finish creating a new VHD or VHDX.

new hard disk

Way 2: Create VHD/VHDX via Disk Management

Step 1: Right-click on This PC and select Manage.

Step 2: When the Computer Management shows you, expand the StorageDisk Management. Then click on ActionCreate VHD.

create vhd on computer management

Step 3: Click on Browse to choose where to save new VHD/VHDX. After that, set up a disk size and choose disk format and type.

create and attach virtual hard disk

Step 4: Right-click on the new hard disk and select Initialize Disk.

initialize disk

Step 5: Right-click on the unallocated partition, select New Simple Volume.

new simple volume

Part 2: Mount/Unmount VHD or VHDX from Command Line

If you want to move VHD or VHDX to other devices, you must mount or unmount for the first step. Here are two ways to mount or unmount a VHD or VHDX.

Way 1: Mount/umount VHD or VHDX via Command Prompt

Step 1: Right-click on Start and select Command Prompt (Admin).

Step 2: Type the following command lines and press Enter at the end of each line.

  • diskpart
  • select vdisk file="Your VHD file location"

Then run "attach vdisk" to mount VHD/VHDX.

Similarly, you can run "detach vdisk" to unmount VHD/VHDX.

mount vhd via cmd

Way 2: Mount and unmount VHD/VHDX by PowerShell

Step 1: Type Powershell in the Cortana research box then right-click on the result and select Run as administrator.

run powershell

Step 2: To mount VHD/VHDX, you can run Mount-VHD –Path "[location of vhd]".

To unmount VHD/VHDX, you can run Unmount-VHD –Path "[location of vhd]".

mount powershell

Part 3: How to Convert VHD/VHDX to VHDX/VHD

Once you need a larger virtual hard disk, you can convert VHD to VHDX to save more information. On the contrary, when you want to compatible with previous Windows version, you need to convert VHDX to VHD. Here is how to do.

Way 1: Convert VHD/VHDX to VHDX/VHD by Hyper-V Manager

Step 1: Open Hyper-V Manager, click on Edit Disk on the right sidebar.

edit disk

Step 2: When the Edit Virtual Hard Disk Wizard shows you, click Next button to continue.

edit virtual hard disk wizard

Step 3: Locate to where your virtual hard disk is stored.

where is the virtual hard disk located

Step 4: Select Convert > Next.

convert

Step 5: Choose the disk format.

choose disk format

Step 6: Choose a disk type for it.

choose disk type

Step 7: Configure where to save the new virtual hard disk. Click on Next to finish the process.

configure disk

Way 2: Convert VHD/VHDX to VHDX/VHD by PowerShell

It will be easier to use PowerShell than Hyper-V Manager to convert. Let's get start.

Step 1: Run PowerShell as administrator.

Step 2: Run "Convert-VHD –Path d:\HyperV\test\MyVHD.vhd –DestinationPath d:\HyperV\test\MyVHDX.vhdx" to convert VHD to VHDX.

You can also run "Convert-VHD –Path d:\HyperV\test\MyVHDX.vhdx –DestinationPath d:\HyperV\test\MyVHD.vhd" to convert VHDX to VHD.

convert vhd powershell

Related Articles: