Monitor Work from Home Employees with Employee Desktop Live Viewer.

Read More

How to Remove a VHD from a Virtual Machine?

Megha Sharma
Megha Sharma Updated On - 08 May 2020

The article that you are going to read is basically a help blog to suggest manuals solutions for removing or detaching a VHD from a Windows PC.

Virtual Hard Disk is like a portable storage disk which a user can create on a virtual machine or a PC drive. It acts as a physical drive and contains partitions and file systems to store data. Apart from storing data, it can be used for other purposes like image management, backup, recovery, and transfer of data.

Sometimes, after creating a VHD file and utilizing it for the desired purpose, we feel it is no longer required. At that time, we would like to remove it to free up the storage space. You can try the options explained here to remove the VHD from your computer system.

Methods to delete VHD from Computer System

  • Through Command Prompt
  • Through Disk Management Console

Through Command Prompt

This method involves removing the Virtual Hard Disk from the system by detaching the VHD file using CMD commands. Let us understand this method in detail with these steps.

  1. Search for Command Prompt application by typing cmd, right-click on it, and select Run as administrator option.
  2. select Run as administrator option

  3. Click Yes to continue.
  4. Click Yes to continue

  5. In the opened Command Prompt screen, run diskpart command to reach the disk partition mode.
  6. run diskpart command to reach the disk partition mode

  7. Next run the command is to select the VHD file for further action.
  8. select vdisk file= “<enter VHD file path location>”

    select the VHD file for further action

  9. Now, detach this VHD file from the disk location using this command.
  10. detach vdisk

    using this command

  11. Finally, exit the Command Prompt window using the exit command.
  12. exit

    exit the Command Prompt window using the exit command

  13. Hence, the VHD file is successfully detached from the disk partition.

Through Disk Management Console

It is an alternative to remove the VHD file from the system location. This method utilizes Disk Management Console which is simpler to execute and can be carried out with few sequential steps described below.

  1. In Start, go to your PC icon, right-click on it, and select Manage option.
  2.  Start, go to your PC icon, right-click on it, and select Manage option

    Note: You can use the Run box (Windows + R) to open the Computer Management page by typing diskmgmt.msc and clicking OK.
    Run box (Windows + R) to open the Computer Management page by typing diskmgmt.msc and clicking OK

  3. On the Computer Management page, go to Storage and select the Disk Management option. Here, you can view the disk drives and VHDs.
  4. select the Disk Management option

  5. Select the VHD drive which you want to delete, right-click and then click Delete Volume option.
  6. right-click and then click Delete Volume option

  7. A notification for confirmation appears. Click Yes to continue.
  8. Click Yes to continue

  9. Next, you will find the status of VHD disk is changed from Online to Unallocated. You still need to detach the VHD to completely remove it from the Disk Management system. Right-click the VHD disk icon and select Detach VHD option to detach the VHD file.
  10.  Right-click the VHD disk icon and select Detach VHD option to detach the VHD file

  11. Finally, the VHD file is removed from the system drive.
  12. VHD file is removed from the system drive

So, you can go for any of the methods explained above to remove the VHD file from your system drive. Thus, you can get rid of the unwanted VHD files anytime.

But if you are unable to access the VHD/VHDX files due to corruption or other issues, we do have a perfect solution for you which is Kernel for VHD Recovery tool. The tool can recover data from any VHD or VHDX file, display its data and let users save it to the desired location. You can go to the website of this advanced tool and try the demo version for learning more about the tool.

Download Now