A virtual hard disk is very much identical to the physical hard disk of your personal computer. You have two types of Virtual Hard Disk files:
A VHD file represents a Virtual Hard Disk Drive. It can accommodate everything that is present on a physical HDD – disk partitions, file systems, data files, and folders. It is used as the hard disk of a virtual machine.
A VHDX format represents a Hyper-V Virtual Hard Disk Drive. It has a much larger storage capacity i.e. 64 TB as compared to VHD file which has 2 TB storage limitation. It can protect your data from corruption, and extreme power failures.
It is the simplest way to mount or unmount a VHD or VHDX file. Follow the below mentioned simple steps to Mount and Unmount (Eject):
Step 1: To mount VHD/VHDX file, right-click on the VHD/VHDX file and select Mount.
The VHD disk will be added to This PC as an additional drive. You can now copy, move or access the required data from the drive. It behaves like general physical storage now.
Step 2: To unmount VHD/VHDX file, go to the New Volume/drive, right-click and select Eject to detach or unmount.
Please Note: The method can be performed without any technical expertise by any novice user who has a VHD file and wants to restore data from it.
Another way to mount or unmount VHD or VHDX file is through Disk Management. Follow the simple steps to mount and unmount:
Step 1: To mount VHD, right-click on This PC >> Manage >>Disk Management and click Attach VHD.
OR, click Windows key and type diskmgmt.msc in the search box to open Disk Management. Expand Action menu and click Attach VHD.
Note: You can press Win+X keys, and choose Disk Management as shown below.
Step 2: To mount VHD, click Attach VHD and click Browse to load the VHD or VHDX file that is to be mounted. Click OK.
Step 3: To unmount VHD/VHDX file, right-click on the newly added volume and click Detach VHD.
This method can be used in Windows 10/8/7 to mount or unmount VHD/VHDX file.
Step 1: Click Win+X, and click Command Prompt (Admin) mode.
Step 2: In cmd, type diskpart and hit the Enter button. Type the following command to select the VHD/VHDX file by specifying its location.
Select vdisk file = “location of VHD file”
Then, hit Enter.
With the help of Windows PowerShell cmdlet, you can mount and unmount VHD/VHDX file in both Windows 10/8/7 and Windows Server 2016/2012/2008.
Step 1: Launch PowerShell cmdlet as Administrator.
Step 2: Type the following commands to mount/attach the VHD/VHDX files:
Mount-DiskImage -ImagePath “location of VHD file”
Step 3: You can unmount the virtual hard disk with the help of this simple command:
Dismount-DiskImage -ImagePath “location of VHD file”
Please Note: For Hyper-V, you might get an error message “Mount VHD is not recognized as the name of a cmdlet”. Then, you will have to add “Hyper-V Module for Windows PowerShell” to your server.
Now you can easily and efficiently copy the required data from VHD file to any disk drive normally and then detach the VHD drive when you are done.
It is possible that you find some of your VHD files corrupted or damaged. There are many reasons behind a corrupted and unreadable VHD/VHDX file. In that case, simply use this trusted software – Kernel for VHD Recovery, which works professionally and efficiently to recover complete data from a corrupt VHD file.
There are different ways to mount or unmount VHD/VHD files – using PowerShell, Command Prompt, Windows Explorer, and Disk Management. But if your VHD/VHDX files are corrupt, you should try third-party tools like Kernel for VHD Recovery tool to recover VHDX file and VHD file.