What Is VHD? [Everything You Should Know]

author icon

Roxanne updated on Apr 13, 2023 to Knowledge Center | How-to Articles

This page focuses on explaining what is VHD and gives detailed steps for how to use a VHD file. It also mentions the differences between VHD and VHDX, including the pros and cons of each.

The Virtual Hard Disk, an image format that encapsulates an entire hard drive into a single file, taken and applied by programmers, continues to grow in popularity. This article will give a complete introduction to what is VHD and some detailed steps for how to use a VHD file. It also mentions the differences between VHD and VHDX, including the pros and cons of each. If you are interested in the content, continue to read. 

What Is VHD?

We can take a look at the definition of VHD from Wikipedia:

VHD (Virtual Hard Disk) and its successor VHDX are file formats representing a virtual hard disk drive (HDD). They may contain what is found on a physical HDD, such as disk partitions and a file system, which can include files and folders. - From Wikipedia

And VHD is a publicly-available image format specification that can operate the system as a virtual disk to provide as many functions as a physical computer system. In other words, it can store the contents in all the same ways physical hard disks are used. As a result, it extends the efficiency and flexibility of the computer. Here are the three main types of VHD:

Fixed-Size VHDs

A fixed-size VHD is created at the maximum volume size, containing data blocks. So, for example, if you create a 107 GB fixed VHD, it will allocate 107 GB of the data block of the host storage data.

Dynamic Expanding VHDs

A dynamically expanding VHD is used for which the initial virtual hard disk contains no data blocks. Instead, space I dynamically allocated as data is compressed to the VHD up to the maximum storage space when the virtual hard disk is created. For example, a 2 -GB dynamically expanding disk contains VHD and requires less than 4 MB of physical storage space.

Differencing VHDs

This VHD format is less popular than the former two kinds. Differencing VHD is intended for the virtual machine that has a short life. It mainly creates a copy of the hard drives, just like a parent and child disk. And you can change the parent disk without affecting the child VHD.

What Is VHD Used For?

VHD is a file format that can store complete information about Virtual Machines and can be used in many situations. For example, it is helpful for developers to test their products, website, and applications in different environments using a Virtual Machine. As I said, a virtual drive can host multiple operating systems like Windows, Mac, etc. In addition, there are more advantages of VHD as follows :

  • Backup and recovery: it allows you to copy the application, websites, and system to VHD.
  • Antivirus and security: save your data in VHD if a computer virus affects the physical disk.
  • Disk conversion (physical to virtual, and vice versa): move files between a VHD and the host file system
  • Image management and patching: help replicate or copy the data to another system for test and control.

VHD will offer you all the features of a physical hard disk: enable you to create disk sectors and files, run an operating system, and install and execute other applications, which can be used as is on another computer.

How to Use VHD?

VHD can provide all the features that a hard drive has, so if you want to use the powerful features of VHD, we can tell you how to create and open VHD in detail.

Guide 1: How to Create a VHD

Step 1. Open "Disk Management" and select "Create VHD" from the "Action" menu.

Step 2. After the Create and Attach Virtual Hard Disk dialog box opens, store the VHD file in the specified location:

  • Tap the "Browse" button from "Location" and find a folder to store the VHD.
  • Name the drive.
  • Select "Virtual Disk files" from the "Save as type" dropdown menu.
  •  Click "Save."

Step 3. Enter the file size and choose Virtual hard disk type. Click "OK" to finish.

Guide 2: How to Open a VHD

Step 1. Save the VHD file to the desktop and launch "WinZip."

Step 2. Choose all the files inside the compressed file, click "Unzip," and choose "Unzip to PC or Cloud."

Step 3. Select the destination folder to place the extracted files and click the "Unzip" button.

Now you have mastered using VHD but may not know VHD and VHDX. This is because they are different file formats, and people usually get confused about which performs better. We will offer you more information.

VHD vs. VHDX: Which One Is Better

VHDX is a Hyper-V virtual hard disk format applied in Windows Server 2012. So here is a form that analyzes the two formats in multiple aspects to help you decide which fits your situation most.

File Format VHD VHDX
Storage Capacity 2TB

64TB

Supported By Windows, Citrix, and Oracle Windows
Data Protection No data protection Strong security against data corruption
Local Sector Size 512 bytes 4 kb
Data Alignment Meet data alignment issues Improved data alignment
Metadata Track Unable to track Metadata Able to track Metadata

After reading the form, the answer is clear: VHDX is better than VHD in many fields. Depending on your need, you can choose which one to use:

  • For example, if you need to encapsulate data below 2TB, VHD is your good choice.
  • But if you're looking for a safer file format with a larger local sector size, you'd better use VHDX. 

To sum up, VHDX files are better since it has advantages such as more storage capacity, better performance, and protection against data corruption. But VHD files can be mounted user's OS versions more than VHDX files.

Conclusion

This article introduces the VHD and its usage and includes how to create a VHD and the differences between VHD and VHDX. Virtual Hard Drive is like a container file that stores the content from the physical drive, which allows you to have a more effective and flexible operating system. It will help you to know more about VHD.