Member-only story
How to Resolve “VM Size Cannot Boot Hypervisor Generation ‘2’” Error in Azure ARM Template Deployment
When deploying a virtual machine (VM) using Azure Resource Manager (ARM) templates, you may encounter the following error:
##[error]BadRequest: The selected VM size 'Basic_A3' cannot boot Hypervisor Generation '2'. If this was a Create operation please check that the Hypervisor Generation of the Image matches the Hypervisor Generation of the selected VM Size. If this was an Update operation please select a Hypervisor Generation '2' VM Size.
This error occurs when there’s a mismatch between the Hypervisor Generation of the VM size and the image you are trying to use. Specifically, the Basic_A3 VM size does not support Generation 2 VMs, but your selected image requires Generation 2.
What Are Hypervisor Generations in Azure?
Azure virtual machines can be deployed as either Generation 1 or Generation 2. These generations refer to different underlying virtual hardware features, and not all VM sizes support both generations.
- Generation 1: This is the default VM generation in Azure, supporting most workloads.
- Generation 2: This generation introduces enhanced capabilities such as UEFI boot, improved disk handling, and more…