Describe the bug
I have recently had a bad experience with the aks-preview extension, particularly when deploying a custom sig image that happened to not be replicated to the region for my deployment.
Closer inspection in the activity logs for the MC_ resource group shows the following error:
The gallery image /subscriptions//resourceGroups//providers/Microsoft.Compute/galleries//images/AzureLinuxV3gen2/versions/ is not available in westus2 region. Please contact image owner to replicate to this region, or change your requested region.
But the az cli is still hung on CreatingAgentPools: 0/2 nodes completed ..
In my opinion, az cli should handle the failure and surface it to the user.
Related command
Certain fields <omitted> for privacy reasons:
az aks create -g cameronbaird_home_westus2 -n test-image --aks-custom-headers "AKSHTTPCustomFeatures=Microsoft.ContainerService/UseCustomizedOSImage,OSImageSubscriptionID=,OSImageResourceGroup=AKSTest,OSImageGallery=,OSImageName=AzureLinuxV3gen2,OSImageVersion=,OSSKU=AzureLinux,OSDistro=CustomizedImageKata" --node-vm-size Standard_D4s_v5 --nodepool-tags AzSecPackAutoConfigReady=true --location westus2 --node-count 2
Errors
In the portal activity logs:
"The gallery image /subscriptions/<subid>/resourceGroups/<sig>/providers/Microsoft.Compute/galleries/<gallery>/images/AzureLinuxV3gen2/versions/<version> is not available in westus2 region. Please contact image owner to replicate to this region, or change your requested region."
The "bug" is that the az cli hangs forever and doesn't report this error.
Issue script & Debug output
az aks create -g <group> -n <cluster name> --aks-custom-headers "AKSHTTPCustomFeatures=Microsoft.ContainerService/UseCustomizedOSImage,..." --node-vm-size Standard_D4s_v5 --nodepool-tags AzSecPackAutoConfigReady=true --location westus2--node-count 2
Bug will trigger if your custom image is not replicated to westus2.
Expected behavior
az cli returns an error explaining that the sig image is not replicated to the --location specified.
Environment Summary
azure-cli 2.88.0
core 2.88.0
telemetry 1.1.0
Extensions:
aks-preview 21.0.0b9
azure-devops 1.0.6
confcom 2.1.0
resource-graph 2.1.1
serial-console 1.0.0b4
Dependencies:
msal 1.36.0
azure-mgmt-resource 24.0.0
Python location '/opt/az/bin/python3'
Config directory '/home/cameronbaird/.azure'
Extensions directory '/home/cameronbaird/.azure/cliextensions'
Python (Linux) 3.14.5 (main, Jun 30 2026, 10:52:46) [GCC 11.4.0]
Additional context
No response
Describe the bug
I have recently had a bad experience with the aks-preview extension, particularly when deploying a custom sig image that happened to not be replicated to the region for my deployment.
Closer inspection in the activity logs for the MC_ resource group shows the following error:
The gallery image /subscriptions//resourceGroups//providers/Microsoft.Compute/galleries//images/AzureLinuxV3gen2/versions/ is not available in westus2 region. Please contact image owner to replicate to this region, or change your requested region.
But the az cli is still hung on CreatingAgentPools: 0/2 nodes completed ..
In my opinion, az cli should handle the failure and surface it to the user.
Related command
Certain fields <omitted> for privacy reasons:
az aks create -g cameronbaird_home_westus2 -n test-image --aks-custom-headers "AKSHTTPCustomFeatures=Microsoft.ContainerService/UseCustomizedOSImage,OSImageSubscriptionID=,OSImageResourceGroup=AKSTest,OSImageGallery=,OSImageName=AzureLinuxV3gen2,OSImageVersion=,OSSKU=AzureLinux,OSDistro=CustomizedImageKata" --node-vm-size Standard_D4s_v5 --nodepool-tags AzSecPackAutoConfigReady=true --location westus2 --node-count 2
Errors
In the portal activity logs:
The "bug" is that the az cli hangs forever and doesn't report this error.
Issue script & Debug output
az aks create -g <group> -n <cluster name> --aks-custom-headers "AKSHTTPCustomFeatures=Microsoft.ContainerService/UseCustomizedOSImage,..." --node-vm-size Standard_D4s_v5 --nodepool-tags AzSecPackAutoConfigReady=true --location westus2--node-count 2
Bug will trigger if your custom image is not replicated to westus2.
Expected behavior
az cli returns an error explaining that the sig image is not replicated to the --location specified.
Environment Summary
azure-cli 2.88.0
core 2.88.0
telemetry 1.1.0
Extensions:
aks-preview 21.0.0b9
azure-devops 1.0.6
confcom 2.1.0
resource-graph 2.1.1
serial-console 1.0.0b4
Dependencies:
msal 1.36.0
azure-mgmt-resource 24.0.0
Python location '/opt/az/bin/python3'
Config directory '/home/cameronbaird/.azure'
Extensions directory '/home/cameronbaird/.azure/cliextensions'
Python (Linux) 3.14.5 (main, Jun 30 2026, 10:52:46) [GCC 11.4.0]
Additional context
No response