azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

VM SKU unavailable on CLI

Open williamwd opened this issue 4 years ago • 18 comments

Describe the bug This may be an API bug, but I don't know where to report it, definitely not on Azure's Terraform provider repo. I'm trying to use Terraform to create an extra nodepool for AKS using Standard_NC6s_v3 SKU. It throws an error saying that the SKU is not available, except that the subscription has the necessary quota on that region. The error message:

Code="PreconditionFailed" Message="Provisioning of resource(s) for Agent Pool gpunode failed. Error: {\n  \"code\": \"InvalidTemplateDeployment\",\n  \"message\": \"The template deployment failed with error: 'The resource with id: '/subsc
riptions/<subscription_id>/resourceGroups/MC_core-infra-dev_dev-cluster_eastus2/providers/Microsoft.Compute/virtualMachineScaleSets/aks-gpunode-25771213-vmss' failed validation with message: 'The requested size for reso
urce '/subscriptions/<subscription_id>/resourceGroups/MC_core-infra-dev_dev-cluster_eastus2/providers/Microsoft.Compute/virtualMachineScaleSets/aks-gpunode-25771213-vmss' is currently not available in location 'eastus2'
 zones '1' for subscription '<subscription_id>'. Please try another size or deploy to a different location or zones. See https://aka.ms/azureskunotavailable for details.'.'.\"\n }"

Trying to check with az vm list-skus --location eastus --size Standard_N --all --output table reports the same (NotAvailableForSubscription), both on East US and East US 2.

---------------  -----------  ----------------  -------  ----------------------------------------------------------------------------------------------------------------------------------------------
virtualMachines  eastus       Standard_NC6s_v3  1,2,3    ['NotAvailableForSubscription, type: Location, locations: eastus', 'NotAvailableForSubscription, type: Zone, locations: eastus, zones: 1,2,3']
------------------------------------------------------------------------------------------------------------------------------------------------
virtualMachines  eastus2      Standard_NC6s_v3  1,2      ['NotAvailableForSubscription, type: Location, locations: eastus2', 'NotAvailableForSubscription, type: Zone, locations: eastus2, zones: 1,2,3']

All that would be fine, but creating this extra nodepool on Azure Portal works fine. After it was created, I imported it to Terraform using the resource ID and no changes were reported.

To Reproduce Try to verify availability of a NC6s_v3 SKU using CLI. On Portal it works fine.

Expected behavior Show the SKU's status as available and let me create it using Terraform.

Environment summary Linux Fedora 34 Azure CLI { "azure-cli": "2.23.0", "azure-cli-core": "2.23.0", "azure-cli-telemetry": "1.0.6", "extensions": {} } Terraform 1.1.5 Azure Terraform provider 2.95

williamwd avatar Feb 15 '22 18:02 williamwd

Compute

yonzhan avatar Feb 16 '22 00:02 yonzhan

any news yet?

jcavalieri8619 avatar Mar 08 '22 17:03 jcavalieri8619

At present, CLI directly returns the SKU data provided by the REST service, so this should be the service related issue.

zhoxing-ms avatar Mar 09 '22 03:03 zhoxing-ms

Thank you for your feedback. This has been routed to the support team for assistance.

ghost avatar Mar 09 '22 03:03 ghost

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Drewm3, @avirishuv, @vaibhav-agar, @amjads1.

Issue Details

Describe the bug This may be an API bug, but I don't know where to report it, definitely not on Azure's Terraform provider repo. I'm trying to use Terraform to create an extra nodepool for AKS using Standard_NC6s_v3 SKU. It throws an error saying that the SKU is not available, except that the subscription has the necessary quota on that region. The error message:

Code="PreconditionFailed" Message="Provisioning of resource(s) for Agent Pool gpunode failed. Error: {\n  \"code\": \"InvalidTemplateDeployment\",\n  \"message\": \"The template deployment failed with error: 'The resource with id: '/subsc
riptions/<subscription_id>/resourceGroups/MC_core-infra-dev_dev-cluster_eastus2/providers/Microsoft.Compute/virtualMachineScaleSets/aks-gpunode-25771213-vmss' failed validation with message: 'The requested size for reso
urce '/subscriptions/<subscription_id>/resourceGroups/MC_core-infra-dev_dev-cluster_eastus2/providers/Microsoft.Compute/virtualMachineScaleSets/aks-gpunode-25771213-vmss' is currently not available in location 'eastus2'
 zones '1' for subscription '<subscription_id>'. Please try another size or deploy to a different location or zones. See https://aka.ms/azureskunotavailable for details.'.'.\"\n }"

Trying to check with az vm list-skus --location eastus --size Standard_N --all --output table reports the same (NotAvailableForSubscription), both on East US and East US 2.

---------------  -----------  ----------------  -------  ----------------------------------------------------------------------------------------------------------------------------------------------
virtualMachines  eastus       Standard_NC6s_v3  1,2,3    ['NotAvailableForSubscription, type: Location, locations: eastus', 'NotAvailableForSubscription, type: Zone, locations: eastus, zones: 1,2,3']
------------------------------------------------------------------------------------------------------------------------------------------------
virtualMachines  eastus2      Standard_NC6s_v3  1,2      ['NotAvailableForSubscription, type: Location, locations: eastus2', 'NotAvailableForSubscription, type: Zone, locations: eastus2, zones: 1,2,3']

All that would be fine, but creating this extra nodepool on Azure Portal works fine. After it was created, I imported it to Terraform using the resource ID and no changes were reported.

To Reproduce Try to verify availability of a NC6s_v3 SKU using CLI. On Portal it works fine.

Expected behavior Show the SKU's status as available and let me create it using Terraform.

Environment summary Linux Fedora 34 Azure CLI { "azure-cli": "2.23.0", "azure-cli-core": "2.23.0", "azure-cli-telemetry": "1.0.6", "extensions": {} } Terraform 1.1.5 Azure Terraform provider 2.95

Author: williamwd
Assignees: zhoxing-ms
Labels:

Compute, Service Attention, customer-reported, CXP Attention

Milestone: Backlog

ghost avatar Apr 26 '22 09:04 ghost

Adding @jaylabell to track the CLI issue as well.

avirishuv avatar May 05 '22 17:05 avirishuv

Updating this to a question because it is either a question or a bug.

Drewm3 avatar May 05 '22 20:05 Drewm3

Hi @williamwd, from the issue it sounds like you are seeing that a SKU is shown as not available through the the AKS CLI interface, but then the same SKU is available in the same zone in the same subscription in the Azure portal? Could you confirm that this is still occurring? Normally the SKU not available error message for a specific subscription, SKU, region and zone should be consistent regardless of the client tool that is being used. The following link provides details on how to request access to the SKU if it is critically required for your business: https://docs.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/error-sku-not-available?tabs=azure-cli#solution.

If you are able to still reproduce the issue, then could you attempt to create just a single VM or single instance VM Scale Set in the same subscription, region, zone using the CLI and using the portal. It would be very strange for the portal to work and not the CLI, but it is always possible that there is a bug somewhere that is causing unexpected behaviors. If there is a unexpected bug, then we will want to narrow down the scenario as much as possible.

Drewm3 avatar May 05 '22 22:05 Drewm3

@TravisCragg-MSFT, I have moved this over to you in case this ends up being an issue with the SKU API.

Drewm3 avatar May 05 '22 22:05 Drewm3

Hi @williamwd, from the issue it sounds like you are seeing that a SKU is shown as not available through the the AKS CLI interface, but then the same SKU is available in the same zone in the same subscription in the Azure portal? Could you confirm that this is still occurring? Normally the SKU not available error message for a specific subscription, SKU, region and zone should be consistent regardless of the client tool that is being used. The following link provides details on how to request access to the SKU if it is critically required for your business: https://docs.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/error-sku-not-available?tabs=azure-cli#solution.

If you are able to still reproduce the issue, then could you attempt to create just a single VM or single instance VM Scale Set in the same subscription, region, zone using the CLI and using the portal. It would be very strange for the portal to work and not the CLI, but it is always possible that there is a bug somewhere that is causing unexpected behaviors. If there is a unexpected bug, then we will want to narrow down the scenario as much as possible.

This is precisely the case, creating from Terraform would fail and verifying on CLI would result in errors. Creation on portal would succeed, and our workaround was to create there and then import to Terraform.

That said, I am no longer assigned to that project. @jcavalieri8619 can you please follow up on this?

williamwd avatar May 06 '22 17:05 williamwd

@jcavalieri8619, please let us know if you will be able to provide details on how to reproduce this issue including the specific Azure Region and SKU that you are using.

Drewm3 avatar May 09 '22 04:05 Drewm3

@jcavalieri8619 Please update us on any repo steps so that we can continue with this issue.

TravisCragg-MSFT avatar Jul 21 '22 19:07 TravisCragg-MSFT

@williamwd We are going to close this issue as inactive. When you are ready to continue with this issue, please mention me and provide additional information for us to continue troubleshooting. Thank you.

TravisCragg-MSFT avatar Aug 25 '22 17:08 TravisCragg-MSFT

We are having a very similar issue using bicep. It says the sku is not available in the region for 'Standard_B8ms' That said using the portal it available using Powershell command Get-AzVMSize -Location "southcentralus"| where{$_.name -like "standard_b*"} also show available, but using the CLI az vm list-skus --location southcentralus --size Standard_B --all --output table it show it not

We were able to create the VM using the portal, we then re-ran the bicep, this time it didn't complain about the SKU no being available, since the machine was already there, and it re-apply all the settings.

JANA-mrioux avatar Dec 28 '23 21:12 JANA-mrioux

same issue here.

ibigbug avatar Dec 01 '24 18:12 ibigbug

az vm list-skus should be used to determine if a SKU is available for your subscription. If you are unable to deploy a VM and you do not have quota or a SKU restriction, your best bet is to follow up with azure support.

TravisCragg-MSFT avatar Dec 03 '24 23:12 TravisCragg-MSFT

No I have quota and I can deploy through portal. Just API returns SKU not available.

ibigbug avatar Dec 04 '24 00:12 ibigbug

I am having the same issue. running az vm list-skus shows I have availability, but my Bicep deployments fail saying no capacity. I have been running this for days with no luck. At this point I must say it's not my scripts. the same VM is available and can be built in the portal. And I really don't want to have to pay for support when at this point everything is pointing to an error that should be clearly defined.

TrueCodePoet avatar May 14 '25 18:05 TrueCodePoet