Know here How to Remove a Virtual Hard Disk from a Virtual Machine
We all know that Virtual Machine uses VHD files for data storage. VHD is a removable disk that is created by the user on a virtual machine. Its functions are the same as of physical hard disk i.e storing data. However, apart from this, it serves many other functions like data transfer, data recovery, image management, etc.
Several times users require to remove a virtual Hard disk from a Virtual Machine due to various reasons (We will discuss the reasons further in the blog). In this blog, we will explain the methods for doing this task.
You must know that removing a virtual hard disk disconnects it from a virtual machine in VMware Player. The Virtual storage files are removed from the host system. After a virtual hard disk has been removed from a virtual machine, it can be mapped or mounted to the disk system or added to another virtual machine again.
Also, Read -> Fix error- Virtual Box cannot register the hard disk
Reasons to remove Hard disk from virtual machine VMware
Whenever the users feel the requirement of data storage space he/she creates a virtual hard disk. But, it is been that after some time when the VHD file is useless or they get corrupted due to some malicious attack, users try to get rid of them. In this case, the user tries to remove VHD files from the Virtual Machine.
Methods to remove a virtual Hard disk from a Virtual Machine
There are basically two methods for performing this task. We will be discussing them one by one. You can try any of them as per your ease.
Method 1- Using Disk Management console
In this method, we will be using the Disk Management Console. Follow the below steps carefully:
- Firstly, press the Windows key and then on PC icon Right-click to choose the Manage option.
- Computer management page will open. On that, visit Storage and choose the Disk Management option. You can see all the disk drives and VHDs.
- Now, simply choose the VHD drive and right-click on it that you want to remove from your PC. Hit on the Delete Volume option.
- A pop-up message for deletion confirmation will appear on the screen, hit on Yes to continue.
- The disk status of VHD will change from Online to Unallocated. Now, to remove the VHD altogether, right-click on the VHD disk icon and select Detach VHD option to detach the VHD file.
- Lastly, your VHD files would be removed from the system
Method 2- Using Command Prompt
Another way to remove Hard disk from virtual machine VMware is by using the command prompt. Follow the below instructions carefully for this method.
- Firstly, open the command prompt by pressing the Windows key and typing cmd on the search bar.
- Now, right-click on Command prompt and choose run as administrator option.
- User control panel will appear, Click YES on that.
- Now, type diskpart command on the command prompt screen.
- Then run another command as follows to choose the VHD file:
select vdisk file= “<enter VHD file path location>”
- Now, use the “detach vdisk” command, to detach this VHD file from the disk location.
- Lastly, use the exit command to leave the Command Prompt window.
So, by performing any of the above 2 Methods you can easily remove a Virtual Hard Disk from a Virtual Machine.
But, if you face a situation where you are not able to access the VHD/VHDX files then there are chances that the VHD/VHDX files are damaged or corrupted. Then, in this case, it becomes necessary to overcome this corruption stage. This can be done by using a VHD recovery tool. It is a highly reliable, safe and efficient way for recovering from your VHD files corruption. The utility smartly recovers VHD files ensuring complete data security and data integrity.
I think that this blog provides you with enough information to remove a Virtual Hard Disk from a Virtual Machine easily. Also, I tried to cover the reasons why Virtual Machine users fall into the situation to remove the hard disks. Moreover, if the user faces any problem regarding the corruption of VHD files then the solution for that is also included. I hope, this guide was useful for you.