HyperV Generation on Azure VM

2 for more secure boot and larger boot volume

Xin Cheng
2 min readApr 12, 2023

That is something that crossed to me before and that was my thinking: OK, there are generation 1 and 2, and 2 is usually better than 1, however, client platform team does not support generation 2 yet, so nothing to worry about, until I encountered following issue when trying to deploy the latest and greatest A100 GPU (Standard_ND96asr_v4) to Azure:

“The selected VM size cannot boot Hypervisor Generation 1”.

That is a bummer, so we cannot use the mightiest GPU server, but only the next available SKU which supports Hyperv generation 1, and latest Azure VM SKUs usually do not support generation 1.

So why this generation thing? Why the most powerful and latest Azure VM SKU does not support generation 1?

According to Microsoft, they always recommend Generation 2, unless the following things occur

  • You’re using an existing, pre-built virtual disk (VHD or VHDX) which is not compatible with UEFI.
  • Generation 2 doesn’t support the operating system you want to run on the virtual machine.
  • Generation 2 doesn’t support the boot method you want to use.

So on high-level, Gen 1 VMs are more flexible in terms of compatibility of guest OS (the above article documents the supported guest OS) and support both VHD and VHDX.

Advantage of Gen 2

The following features do

Secure Boot: This is a feature that verifies the boot loader is signed by a trusted authority in the UEFI database to help prevent unauthorized firmware, operating systems, or UEFI drivers from running at boot time.

Larger boot volume: The maximum boot volume for generation 2 virtual machines is 64 TB. For generation 1 virtual machines, the maximum boot volume is 2TB for a .VHDX and 2040GB for a .VHD.

Performance

The major performance improvement of Gen 2 VMs are on the boot speed and security side. Other than these two, there’s no performance gap between Gen 1 and Gen 2 VMs in actual work cases.

Conclusion

If I have the choice, for more secure boot and higher boot volume, Hypervisor generation 2 VMs should be prioritized.

Appendix

--

--

Xin Cheng
Xin Cheng

Written by Xin Cheng

Multi/Hybrid-cloud, Kubernetes, cloud-native, big data, machine learning, IoT developer/architect, 3x Azure-certified, 3x AWS-certified, 2x GCP-certified

No responses yet