Are you aware of VHD files? Do you know the way to open VHD Files in Windows? Have you worked on VHD files ever? A lot will be informed about the VHD file in this blog. You will come to know what is VHD file, how to create VHD file, and how to open a damaged VHD file.
Overview of VHD File
VHD is shortened for Virtual Hard Disk format. It is a virtual hard disk drive. It has a disk partition, file system, files/folders like the hard disk drive. The virtual machine uses it as a hard disk.
A VHD file works as a backup for your system image in MS Windows Vista and later versions. However, in Windows XP and prior versions, the NT-Backup tool was used to back up the system data. It supports two backups – file backup and system backup. If you wish to seek back up of specific files and folders, then save them in ZIP files as file backup. On the contrary, if you want to seek back up of the whole system then a disk image will be created and saved in VHD file format. So, let us first know how to create VHD file?
How to Create VHD Files?
With the help of Disk Management feature in Windows, A VHD file is created for the virtual machine. And to seek the backup of the whole system, the Backup and Restore tool is utilized. You can carry out the below-mentioned processes for creating VHD files.
A. Create VHD Files Via Disk Management
- First, click ‘My Computer’ icon and then click on ‘Manage’.
2. In the next step, The Computer Management window will open in Windows Explorer. Go to the Storage tab and click on Disk Management.
3. Towards the right side, you will find the list of a separate area of Actions. Then, click on More Actions << option shown below Disk Management << Create VHD.
4. In the next step, go to Create and Attach Virtual Hard Disk window and browse the location to save the new VHD file and give the name to the file. Make sure that you choose the file size along with the virtual hard disk format. After this, click OK.
5. You will find that your virtual hard disk (VHD) file will be created quickly and you can see your VHD file.
B. Create VHD Files Using Backup and Restore
- First, click the Start button and go to the search bar, and type Backup and Restore.
- Then Open Control Panel << All Control Panel Items << Backup and Restore. After that, click on Create a system image available under the Control Panel Home.
3. In the Create a system image window, select the location to save the backup file.
4. Now, select the drive(s) to be included in the backup. After this, click on ‘Next’ button to carry out the process.
5. Ensure about the backup settings, before you begin with the backup process. Then, click on the Start backup button.
The above-given methods help in creating the VHD file. At times, VHD files get damaged because of virus attacks, storage media malfunction, software issues, inapt system shutdown, and so many others. After severe damage, you fail to access your VHD file at all. This may cause data loss. Next, you will find the solution to access VHD files.
Way Out to Open VHD Files
To open VHD file, run a script on Windows PowerShell. This will mount the VHD file in the root folder. Now, run a CHKDSK on it. After that, Run the commands given below and ensure changing the fields accordingly:
- In the second method, create a new Virtual Machine, and add the damaged Virtual disk file to it. Now, make it compact. Here are the steps:
- Create a new Virtual Server and add the new hard disk.
- Next, click on Settings, and select the hard disk created earlier. Then, browse to the VHD file which fails to load.
- Now, click on the Virtual Disk Wizard, and select the compact option. Ensure that the ‘Convert it to a fixed-size virtual hard disk’ is selected.
VhdTool.exe /repair <BaseVhdFileName> <FirstSnapshotAVhdFileName> [/quiet]
Important to Note: If the original size of VHD is 30 GB but in actual it is occupied by 10 GB data, then the new VHD file be compacted to 10 GB.
- Now, save this VHD file with a new name.
Once the compact process of the VHD file gets over, copy the VHD file to the original server and try to mount it.
You can also try to use VHD Tool by Microsoft. This tool can VHD files. To use this tool, first, download the executable file, and then run it as an administrator on your PC with the command.