Virtual Hard Drive VHD Types

Mark Regan | November 15th, 2017 | Technology Overview

vhd drive

One of the major reasons that say virtual systems are very great is the flexibility of the VHDs, the virtual hard disks. In comparison to a physical hard drive, it is easier and quicker to create, add or remove a VHD from a VM, the virtual machine. A VHD also supports several configurations which allow a user to use his physical hard drive space very efficiently.

vhd

VHD File Types

There are basically 2 main types of VHDs as follows:

  • Fixed-size VHDs
  • Dynamically expanding VHDs

VHD Types – Fixed Sized VHDs & Dynamic VHDs

Both the types of virtual hard disk vhd drives have an upper size limit which defines how large will the disk appear to the VMs which will be hosted within the Virtual Server. Though, the fixed-size virtual hard disks occupy the physical drive space automatically on the file system of the host machine, whereas, the dynamically expanding VHDs allocate the space only as it is needed.

Which Type of VHD is Better & Under What Condition?

  • In case of limited available physical disk space:
    The dynamically expanding VHDs are better in this case as with this option; it will be easier for you to manage.
  • Performance wise:
    The fixed-size VHDs provide the best performance as they avoid the overhead as well as the fragmentation which is related to the growing of the files.

What is a Linked Virtual Hard Disk?

The linked VHD maps to the single most physical hard drive on the host machine. A linked hard disk gets created mainly to convert a physical drive into a virtual one. First of all, you need to create the linked hard disk, and only after that, you convert that into any of the two above mentioned types of VHDs, either the fixed-size one or the dynamically expanding one.

Note
Be cautious of making the linked VHD accessible to a VM, as the virtual machine can alter the data saved on the physical hard drive of the host machine.

Advantage of Using VMs

A great benefit of using the VMs is that we hold the privilege to roll back a virtual machine to its original state any time. This can be accomplished by enabling Undo disks in the Virtual Server. If you will check this particular box, then the Virtual Server automatically creates a file with extension as .vud for every VHD which is attached to the virtual machine. This process effectively makes the previous files with .vhd extension as read-only, and after that, all the write operations will then be carried out to the undo files. While choosing to switch off a virtual system, one can keep these undo disks, and also commit the required changes (that will update the base .VHD format files) or even discard any changes done (that will effectively roll a virtual system back to its previous state before the user had enabled the undo disks).

Differencing VHD Disks

  • The differencing disks are basically based on 2 VHD types, as follows:
  • The fixed-size VHD
  • The dynamically expanding virtual hard disk
  • The differencing disks tend to store all the alterations which would be otherwise written to the parent virtual disk.
  • One can easily configure these disks with the parent-and-child relationship, which forms a hierarchy of the types of VHD. It is however important to note here that any VHD serving as the parent must be kept with the status as read-only.
  • These disks can considerably augment the manageability (especially when the multiple machines together share the same configuration)
  • These differencing disks can significantly decrease the disk space needed on a VM’s host system.
  • Inside the VM, it is possible to merge the differencing disk with the parent, which is an operation which commits all the alterations, and it will either update the base virtual hard disk or create a fresh virtual hard drive VHD file.
  • There are some drawbacks too; the differencing disks can sometimes be tough to manage and bigger disk hierarchies can even potentially result in the problems of performance (specifically when all the physical virtual hard drive VHD files are located on similar arrays or disks).