A virtual hard disk is a set of data blocks that the host operating system stores as a regular Windows file with a VHD, VHDX, or VHDS extension. All virtual disk format types are supported with ME5 storage.
Virtual hard disk format
There are three kinds of virtual hard disk formats that are supported with either VM generation:
- VHD is supported with all Hyper-V versions but is limited to a maximum size of two TB. VHD is a legacy format.
- The New Virtual Hard Disk Wizard may default to VHD with older versions of Hyper-V. However, VHDX should be used for new VM deployments when supported by the guest operating system.
- VHDX is supported with Windows Server 2012 Hyper-V and newer.
- VHDX format is more resilient.
- VHDX offers better performance and capacity - up to 64 TB.
- It is easy to convert a VHD to VHDX format using tools such as Hyper-V Manager or PowerShell.
- VHDS (or VHD Set) is supported on Windows Server 2016 Hyper-V and newer.
- Two or more guest VMs can share access to a VHDS.
- Guest VMs can use VHDS disks as virtual cluster disks in highly available (HA) configurations.
Figure 6. Virtual hard disk format options
Virtual hard disk type
In addition to the formatting options, a virtual hard disk can be designated as fixed, dynamically expanding, or differencing.
Figure 7. Options for virtual disk type
A dynamically expanding disk is the default type and will work well for most Hyper-V Hyworkloads on ME5 storage. If the ME5 is configured to use thin provisioning, only new data consumes storage capacity, regardless of the disk type (fixed, dynamic, or differencing). As a result, determining the best disk type is a function of the workload as opposed to how it will impact storage utilization. For general workloads, the performance difference between fixed and dynamic will usually be negligible. For workloads generating high I/O, such as Microsoft SQL Server databases, Microsoft recommends using the fixed-size virtual hard disk type for optimal performance.
A fixed virtual hard disk consumes the full amount of space from the perspective of the host server. For a dynamic virtual hard disk, the space is consumed as the VM writes new data to the disk. Dynamic virtual hard disks are more space efficient from the perspective of the host. From the perspective of the guest VM, either type of virtual hard disk shown in Figure 8 will present the full formatted size of 60 GB to the guest.
Figure 8. Fixed and dynamic virtual hard disk comparison
There are some performance and management best practices to consider when choosing a virtual hard disk type in your ME5 storage environment.
- Fixed-size virtual hard disks:
- Workloads or functions that generate high disk I/O experience better performance with fixed-size VHDs.
- Fixed-size VHDs are less space efficient on the host server volume. For example, a 100 GB fixed-size VHD file consumes 100 GB on the host, even if the VHD contains no data.
- Fixed-size VHDs are less susceptible to fragmentation.
- Fixed-size VHDs take longer to copy to another location. The VHD file size is the same as the formatted size, even if the VHD contains no data.
- Dynamically expanding virtual hard disks:
- Dynamic VHDs are recommended for most workloads, except for high disk I/O use cases.
- Dynamic VHDs are space-efficient on the host, and the VHD file expands only as new data is written to it by the VM.
- Dynamic VHDs are more susceptible to fragmentation at the host level.
- A small amount of extra host CPU and I/O is required to expand a dynamic VHD file as it increases in size. Performance is not impacted unless the workload I/O demand is high.
- Less time is required to copy a dynamic VHD file to another location. For example, if a 500 GB dynamically expanding VHD contains only 20 GB of data, the VHD file size when copied to another location is 20 GB.
- Dynamic VHDs allow the host disk space to be overprovisioned. Host disk space should be monitored closely. Configure alerting on the host server to avoid running volumes out of space when supporting dynamic VHDs.
- Differencing virtual hard disks:
- Use cases are limited. For example, a virtual desktop infrastructure (VDI) deployment can leverage differencing VHDs.
- Storage savings can be realized with differencing VHDs by allowing multiple Hyper-V guest VMs with identical operating systems to share a common virtual boot disk.
- All children must use the same virtual hard disk format as the parent.
Virtual hard disks and thin provisioning with ME5
Any virtual hard disk (fixed, dynamic, or differencing) will experience space usage efficiency on ME5 storage when the array is configured to use storage thin provisioning.
The example shown in Figure 9 illustrates a 100 GB volume presented to a Hyper-V host that contains two 60 GB virtual hard disks. Overprovisioning is shown in the example to demonstrate behavior, not as a best practice. One disk is fixed, and the other is dynamic. Each virtual hard disk contains 15 GB of data. From the perspective of the host server, 75 GB of space is consumed and can be described as follows:
Example: 60 GB fixed disk + 15 GB of used space on the 60 GB dynamic disk = 75 GB total
Note: The host server will always report the formatted size as consumed for a fixed-size VHD.
Figure 9. Thin provisioning with ME5
Comparatively, The ME5 array reports storage utilization on this same volume as follows:
Example: 15 GB of used space on the fixed disk + 15 GB of used space on the dynamic disk = 30 GB
Note: Either type of virtual hard disk (dynamic and fixed) will consume the same space on ME5 when thin provisioning is leveraged. Other factors such as the I/O demand of the workload would be primary considerations when determining the type of virtual hard disk in your environment.
Overprovisioning with dynamic virtual hard disks
With dynamic VHDs and thin provisioning, running the storage out of space is a concern if the storage is overprovisioned.
To mitigate risks, consider the following best practice recommendations:
- Create Hyper-V physical volumes that are large enough so that current and future expanding dynamic virtual hard disks will not fill the host volumes to capacity. Creating large Hyper-V physical volumes will not waste space on ME5 arrays that leverage thin provisioning.
- If Hyper-V checkpoints (snapshots) are used, allow adequate overhead on the physical volume for the extra space consumed by the snapshot data.
- Expand existing physical volumes as needed to avoid the risks associated with overprovisioning.
- Configure monitoring if a physical host volume with virtual hard disks is overprovisioned. For example, a percent-full threshold can generate a warning with enough lead time to allow for remediation.
- Monitor alerts on ME5 storage so that warnings about disk group and pool capacity thresholds are remediated before they reach capacity.