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 PowerStore 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 2 TB. VHD is a legacy format.
- The New Virtual Hard Disk wizard might default to VHD with older versions of Hyper-V. However, use VHDX 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 11. Virtual hard disk format options
Virtual hard disk type
Besides applying formatting options, you can designate a virtual hard disk as fixed, dynamically expanding, or differencing.
Figure 12. Options for virtual disk type
A dynamically expanding disk is the default type and will work well for most Hyper-V Hyworkloads on PowerStore storage. With PowerStore, 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 the following figure will present the full-formatted size of 60 GB to the guest.
Figure 13. 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 PowerStore 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 use differencing VHDs.
- You can realize storage savings 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 PowerStore
Any virtual hard disk (fixed, dynamic, or differencing) will experience space-usage efficiency on PowerStore storage due to storage thin provisioning.
The example in the figure below shows 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, but 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 14. Thin provisioning with PowerStore
Comparatively, PowerStore 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 PowerStore because of thin provisioning. 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 PowerStore because of thin provisioning.
- If native 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 PowerStore so that warnings about disk group and pool capacity thresholds are remediated before they reach capacity.