You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: waiting for creation of Managed Kubernetes Cluster "aks-test" (Resource Group "aks-rg-01"): Code="CreateVMSSAgentPoolFailed" Message="VMSSAgentPoolReconciler retry failed: deployment operations failed with error messages: {\n "code": "BadRequest",\n "message": "The selected VM Size 'Standard_DC2s_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."\n } "
on main.tf line 11, in resource "azurerm_kubernetes_cluster" "aks":
11: resource "azurerm_kubernetes_cluster" "aks" {
Steps to Reproduce
terraform apply
Additional information
Since Terraform didn't work out I had to fall back to az cli, which gave me the exact same error as Terraform did.
After some research in Azure documentation, I figured out I need to install the aks-preview extension in az cli to be able to provision AKS clusters with Gen2 VM sizes.
Here are the steps for a successful deployment with az cli:
az extension add --name aks-preview
az feature register --name Gen2VMPreview --namespace Microsoft.ContainerService
az feature list -o table --query "[?contains(name, 'Microsoft.ContainerService/Gen2VMPreview')].{Name:name,State:properties.state}" (wait until status is "Registered" before proceeding to next step)
az provider register --namespace Microsoft.ContainerService
az group create --name aks-test-rg --location westeurope && \
az aks create \
--name aks-test \
--resource-group aks-test-rg \
--kubernetes-version 1.18.4 \
--node-count 3 \
--node-vm-size Standard_DC2s_v2 \
--aks-custom-headers usegen2vm=true
The text was updated successfully, but these errors were encountered:
Taking a look through this appears to be a duplicate of #6793 - rather than having multiple issues open tracking the same thing I'm going to close this issue in favour of that one; would you mind subscribing to #6793 for updates?
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
ghost
locked and limited conversation to collaborators
Sep 23, 2020
Community Note
Terraform (and AzureRM Provider) Version
Terraform v0.13.0-beta3
Affected Resource(s)
azurerm_kubernetes_cluster
azurerm_kubernetes_cluster_node_pool
Terraform Configuration Files
Expected Behavior
Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
Actual Behavior
Error: waiting for creation of Managed Kubernetes Cluster "aks-test" (Resource Group "aks-rg-01"): Code="CreateVMSSAgentPoolFailed" Message="VMSSAgentPoolReconciler retry failed: deployment operations failed with error messages: {\n "code": "BadRequest",\n "message": "The selected VM Size 'Standard_DC2s_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."\n } "
on main.tf line 11, in resource "azurerm_kubernetes_cluster" "aks":
11: resource "azurerm_kubernetes_cluster" "aks" {
Steps to Reproduce
terraform apply
Additional information
Since Terraform didn't work out I had to fall back to az cli, which gave me the exact same error as Terraform did.
After some research in Azure documentation, I figured out I need to install the aks-preview extension in az cli to be able to provision AKS clusters with Gen2 VM sizes.
Here are the steps for a successful deployment with az cli:
The text was updated successfully, but these errors were encountered: