Hi,
I can’t seem to create a generation 2 VM in Azure using Terraform. Neither resources
azurerm_linux_virtual_machine
azurerm_virtual_machine
have an argument for generation listed in the standard docs on the terraform site.
When specifying a gen2 instance type, I get the following error:
Error: Error creating Linux Virtual Machine “nickgen2test-0” (Resource Group “nickgen2test-resources”): compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=400 – Original Error: Code=“BadRequest” Message=“The selected VM Size ‘Standard_DC4s_v2’ cannot boot Hypervisor Generation ‘1’. 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 ‘1’ VM Size.”
Haven’t found anything when searching around online for creating gen2 vms. Is this supported?