Table of Contents

  1. What is a VHD?
  2. What is a VHDX?
  3. Types of VHD/VHDX
  4. What is a Fixed Disk
  5. What is a Dynamically expanding Disk
  6. What is Differencing Disk
  7. Concluding thoughts
  8. How can BDRSuite help you?

Quick Bites:

  1. Hyper-V is a powerful virtualization platform used by many organizations to optimize their IT infrastructure
  2. When creating virtual machines in Hyper-V, the type of virtual disk you choose can have a significant impact on performance, storage, and management
  3. There are three types of virtual disks in Hyper-V: fixed-size disks, dynamically expanding disks, and differencing disks
  4. Fixed-size disks offer better performance and are recommended for production workloads, while dynamically expanding disks are more flexible and easier to manage
  5. Differencing disks are useful for creating virtual machine templates and deploying multiple virtual machines with a common base image

Just like a physical machine, a virtual machine running on Hyper-V would also require a hard disk to function.

In today’s blog post, we’ll discuss what virtual file formats are supported by Hyper-V and their types. We’ll cover in detail, the different types of VHD/VHDX, and how to choose the right one for your business requirements.

Protect Your Data with BDRSuite

Cost-Effective Backup Solution for VMs, Servers, Endpoints, Cloud VMs & SaaS applications. Supports On-Premise, Remote, Hybrid and Cloud Backup, including Disaster Recovery, Ransomware Defense & more!

What is a VHD?

A VHD is a type of file format for the virtualized infrastructure, just like a physical hard disk. It has the functionalities of a typical hard drive but is installed and managed in a virtual setup. It often contains the same partitions and sectors as found on a physical drive, like partitioning and the file system. It can be stored in such a place where the physical host can access it.

Compared to physical drives/disks, VHDs can be created in, added to, or removed from a virtual machine much more easily and quickly. They also allow configurations that help you use the available physical disk space efficiently.

What is a VHDX?

VHDX is another virtual file format in Hyper-V, and it came with the release of Windows Server 2012. Before VHDX, Hyper-V virtual hard disks had a capacity of 2TB. VHDX offers a 64TB capacity. They have a 4KB logical sector size which contributes to better performance, and they are designed to be compatible with today’s modern hardware.

Download Banner

Know more: VHD and VHDX disk overview and conversion

Types of VHD/VHDX

Be it a VHD or VHDX, there are basically three types of disks available that you can choose from:

  • Fixed Disk
  • Dynamic Disk
  • Differencing Disk

What is a Fixed Disk

A fixed-size VHD simply takes up the entire space that is allotted to it during VM creation. The VHD size does not change when data is created or deleted.

For example, if you create a 127 GB fixed VHD, then it means 127 GB disk space of the host storage will be dedicated for this VHD alone.

The fixed type disk is zeroed out when it is created. This, in turn, leads to better performance as Hyper-V doesn’t have to perform a ‘zero operation’ when the first write to the disk takes place. The disks are zeroed out as a security measure so that any underlying data in the physical storage area cannot be accessed by a disk-scanning tool in the virtual machine.

Disk fragmentation occurs when files are written and deleted over time. When you delete a file, it is marked as write-over. So the next time when a new file is created, it simply writes over the space, and if this file happens to be larger than the existing file, then the remaining portion is written in the next available space. Eventually, you will be left with many files broken up into multiple locations across the hard drive. Thus, the files will be available as non-contiguous clusters, which increases the read time.

When it comes to fixed-size VHDs, disk fragmentation is not a major concern, though it occurs if you manually expand the disk or if the disk is created in an already full volume.

Pros:

  • Fastest among the VHD types
  • Better performance for workloads that are sensitive to disk performance
  • Not prone to disk fragmentation

Cons:

  • Creating a fixed disk is a time-consuming process
  • They do not have dynamic growth
  • If the VHD created is too large, there’s no way to re-allocate it any other resource
  • Potential for wasted disk space

In most cases, it is recommended to you use fixed disk since it has better resiliency and performance characteristics compared to the other disk types.

What is a Dynamically expanding Disk

This type of disk expands as data is written to it. The virtual hard disk file that is created at first is small, and it grows as and when data is added to it.

This is the default type that’s selected when you create a VHD.

The file starts out very small with a preset maximum size. This file size grows in chunks as data is added, and the file stops growing when the preset maximum size is reached. When creating a dynamic volume, you must still specify the initial disk size, but the host disk usage is based on how much data is actually being stored in that volume.

For example, if you initially create a 127 GB VHD but the virtual machine only requires 40GB, then only 40GB will be consumed from the host physical disk storage, and the disk will grow in size later as data gets written to it.

In dynamically expanding disks, disk space is zeroed only as and when data is written to it. Also, these disks require a lot of planning and monitoring, as disk space could easily fill up the datastore and take production loads offline unexpectedly.

Though the obvious issue with dynamic disks seems to be the gradual growth of data, the real issue actually lies with the read speeds. Consider the case where 20 small dynamic virtual hard disks on the same volume are each separately growing a block at a time. They cause fragmentation across volumes. This affects the sequential reads as the underlying physical spindles have to spend time bouncing from one block to another within the volume to read the required data.

Pros:

  • Better usage of physical storage space
  • Occupies lesser than 1GB of space initially
  • Offers better growth performance
  • Easy to copy virtual disk files between machines

Cons:

  • Possibility of disk space filling up the datastore
  • Slower read rates
  • Prone to disk fragmentation

Dynamic disk types are recommended for cases where storage is a major concern because it offers resiliency in addition to space savings.

What is Differencing Disk

A differencing disk is a virtual hard disk that is basically a dynamic volume that’s chained to a parent disk. They can be configured with a parent-child relationship to form a hierarchy of VHDs.

A differencing/child disk contains block-level data that represents changes to a parent VHD. Each differencing disk can have only one parent, and the parent can be either a fixed, dynamic, or another differencing virtual disk. The parent can’t be a LUN, remote share, file systems, pass-through disks, etc. Hyper-V can merge all the differencing disks back to the parent, thereby destroying the child disks. For Hyper-V versions above 2008 R2, the merging operation can take place while the disk is in use.

The child disks are usually small, however, they can grow up to the size of the root parent. A differencing disk attached to a dynamic parent can outgrow it, if that disk isn’t fully expanded.

This type of VHD is usually intended for VMs that will have a short life, like pooled Virtual Desktop Infrastructure (VDIs), or test labs. A single parent VHD can be created with a generalized OS, and multiple VMs can be provisioned with differencing VHDs. The new VMs use the shared OS from the parent disk to boot. The differencing VHDs start out small and will grow as data is added to them. The parent disk will have multiple input operations as it is the common denominator. This type of pooled operation is not suitable for personal VDI VMs because you cannot inherit the changes and you have to delete and start again.

You can create a differencing disk based on any parent virtual hard disk using PowerShell or Hyper-V Manager. They are usually created during backup operations and deleted immediately once the backup is complete. However, manual creation is also possible, and it might be useful in the case of the above-mentioned scenarios like creating pooled VDI. But, management could be a little more difficult than expected and there are no other tools to aid you.

When differencing disks are used for the long term, there arises steady performance drop and storage problems, hence it is not ideal for use in production servers.

Pros:

  • Helps in keeping the consistency of base image
  • Good performance for short-lived machines
  • Ability to isolate changes on parent disk, useful for troubleshooting and analysis

Cons:

  • Not suitable for VMs with a long life span
  • Unpredictable storage utilization patterns
  • Possibility of over-provisioning host storage
  • Added complexity when relocating parent disk

Concluding thoughts

While each disk type has its own benefits, it is advisable to choose the disk type based on your specific use case. This way, you can derive the maximum benefit out of it, and make it beneficial for your environment.

When it comes to the production environment, it boils down to the below:

  • If performance is of more concern than storage space, then go with Fixed disks
  • If storage space is more of a concern than performance, then opt for Dynamic disks
  • If you’re looking to run a test environment or create pooled VDIs, then go for Differencing disks

How can BDRSuite help you?

BDRSuite is a comprehensive Backup & DR solution designed to protect your business-critical data across Virtual (VMware, Hyper-V), Physical Servers (Windows, Linux), SaaS (Microsoft 365, Google Workspace), AWS EC2 Instances, Endpoints (Windows, Linux, Mac) and Applications & Databases (MS Exchange, MS Outlook, SharePoint, MSSQL, MySQL).

To protect your workloads running on Hyper-V, check out our BDRSuite for Hyper-V. You can backup your Hyper-V VMs at the Host level and Cluster Level running on local Storage, Cluster Shared Volumes (CSV), SMB share – Standalone File Server, Clustered File Server & Scale-Out File Server (SOFS) etc.

Download a full-featured 30-days Free Trial of the latest version of BDRSuite and try it in your environment.

If you are an IT administrator, a student, or a beginner who would like to learn more about the Hyper-V platform, please check out our series of blogs on Hyper-V:

Beginners’ Guide for Microsoft Hyper-V: Overview of Hyper-V – Part 1
Beginners’ Guide for Microsoft Hyper-V: How to Install Microsoft Hyper-V Using Server Manager – Part 2
Beginners’ Guide for Microsoft Hyper-V: How to Install Microsoft Hyper-V with PowerShell – Part 3
Beginners Guide for Microsoft Hyper-V: How to Install Microsoft Hyper-V in Windows Server Core – Part 4
Beginners Guide for Microsoft Hyper-V: Remote Management of Hyper-V – Part 5
Beginners Guide for Microsoft Hyper-V: How to Install Hyper-V Server – Part 6
Beginner’s Guide for Microsoft Hyper-V: What is Azure Stack HCI – Part 7
Beginner’s Guide for Microsoft Hyper-V: Windows Admin Center Hyper-V Management – Part 8
Beginner’s Guide for Microsoft Hyper-V: Configuration of Hyper-V Networking Best Practices – Part 9
Beginner’s Guide for Microsoft Hyper-V: Hyper-V Storage Best Practices and Configuration – Part 10
Beginner’s Guide for Microsoft Hyper-V: How to build a Virtual Lab with Hyper-V – Part 11
Beginner’s Guide for Microsoft Hyper-V: Top 10 PowerShell Commands for Hyper-V – Part 12
Beginner’s Guide for Microsoft Hyper-V: How to Create a Hyper-V Virtual Machine – Part 13
Beginner’s Guide for Microsoft Hyper-V: Hyper-V Shared Storage for Beginners – Part 14
Beginner’s Guide for Microsoft Hyper-V: How to Create Hyper-V Cluster – Part 15

Latest ones:

Beginners Guide for Microsoft Hyper-V: Learn How to Install MicroK8s on Windows Kubernetes – Part 35
Beginners Guide for Microsoft Hyper-V: Top 8 Basic Docker Commands You Should Know – Part 36
Beginners’ Guide for Microsoft Hyper-V: Windows Docker Container Networking in Hyper-V – Part 37

Beginners’ Guide for Microsoft Hyper-V: How to run IIS in Docker Container – Part 38

Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.

5/5 - (1 vote)