AZ-800 Administering Windows Server Hybrid Core Infrastructure Exam
Eager to master hybrid server management? Discover how to administer Windows Server Hybrid Core Infrastructure on Azure, setting your path towards the Microsoft Certified: Azure Hybrid Infrastructure Administrator Associate certification!
Practice Test
Intermediate
Practice Test
Intermediate
Manage Hyper-V virtual hard disks
Create, Convert, and Resize Virtual Hard Disks
Hyper-V virtual hard disks are the storage containers that hold a VM’s operating system, applications, and data. There are two main formats: VHD and VHDX, with VHDX supporting larger sizes and extra protection against corruption. Understanding the differences between these formats helps you choose the right disk type for performance and compatibility in Azure hybrid environments. You can manage these disks through the GUI in Hyper-V Manager or with PowerShell cmdlets for automation.
When you create a virtual hard disk, you can select one of three types to match your workload needs:
- Fixed: Pre-allocates all the space immediately for consistent performance.
- Dynamically expanding: Starts small and grows as you add data, saving on initial storage.
- Differencing: Captures changes relative to a parent disk, ideal for test scenarios or branching.
Using PowerShell’s
New-VHD
cmdlet or the wizard in Hyper-V Manager makes this process simple and repeatable.
Sometimes you need to switch between disk formats for compatibility or to use advanced features. VHD disks work with older tools but top out at 2 TB, while VHDX disks go up to 64 TB and offer improved metadata logging. Use the Convert-VHD
PowerShell cmdlet to perform a safe conversion, specifying the source and target paths. This operation runs online if the VM is off, ensuring minimal disruption.
Adjusting disk size is often required as workloads change. You can expand a disk online when the VM is running or offline when it’s stopped. PowerShell’s Resize-VHD
cmdlet lets you specify a new size without losing data. Shrinking a disk is not usually supported because it risks data corruption and complex file system changes, so plan ahead when reducing capacity.
Optimizing disk performance requires careful analysis and configuration. Ensure partition alignment so that VM partitions match physical sector boundaries, avoiding extra read/write overhead. When using striped or spanned volumes, set the interleave size (often 64 KB) to match workload patterns for best I/O throughput. Regularly monitor metrics like latency and throughput in Azure Monitor or Performance Monitor to catch issues early.
Conclusion
Managing Hyper-V virtual hard disks in hybrid Azure setups involves creating the right disk type—fixed, dynamically expanding, or differencing—based on storage needs. You should be able to convert between VHD and VHDX formats to leverage performance and size benefits, and to resize disks online or offline as demands grow. Finally, optimizing disk I/O with proper partition alignment and interleave settings ensures your virtual machines run smoothly. Mastery of these tasks using Hyper-V Manager and PowerShell lays the groundwork for efficient, reliable VM storage management.