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

VM Creation - SkuNotAvailable when creating VM in region

Open derekbekoe opened this issue 9 years ago • 22 comments

In the CLI, I tried creating a VM in 'West US' in my subscription but kept on getting a ResourceDeploymentFailure with code SkuNotAvailable.

At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details. {
  "status": "Failed",
  "error": {
    "code": "ResourceDeploymentFailure",
    "message": "The resource operation completed with terminal provisioning state 'Failed'.",
    "details": [
      {
        "code": "DeploymentFailed",
        "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.",
        "details": [
          {
            "code": "Conflict",
            "message": "{\r\n  \"error\": {\r\n    \"code\": \"SkuNotAvailable\",\r\n    \"message\": \"The requested tier for resource '/subscriptions/.../resourceGroups/commute-dev/providers/Microsoft.Compute/virtualMachines/commutedev1' is currently not available in location 'westus' for subscription '...'. Please try another tier or deploy to a different location.\"\r\n  }\r\n}"
          }
        ]
      }
    ]
  }
}

I tried many VM sizes and kept getting the same result.

I then tried in the portal and get the error message "Your subscription doesn't support virtual machine creation in West US."

screen shot 2017-01-19 at 11 26 43 am

The CLI doesn't show a list of supported regions and there doesn't appear to be a way to get this.

Can we use the same logic/API calls as the portal?

derekbekoe avatar Jan 19 '17 20:01 derekbekoe

ARM team is working to give us a new API to query the regions

yugangw-msft avatar Jan 19 '17 22:01 yugangw-msft

Will move to a particular sprint once we get more details from Compute RP team

yugangw-msft avatar Jan 20 '17 21:01 yugangw-msft

CRP will provide API in mid-late Feb.

yugangw-msft avatar Jan 23 '17 18:01 yugangw-msft

@yugangw-msft any news on new API? we struggle with this issue using python SDK with Ansible

berlic avatar Mar 06 '17 08:03 berlic

Hey guys, whats up? we are waiting for this feature

Santinell avatar Mar 24 '17 07:03 Santinell

@sauryadas, this has to be done at compute RP first. I have forwarded an internal mail to you, could you please coordinate to get the API surface to the SDK?

yugangw-msft avatar Mar 24 '17 16:03 yugangw-msft

@yugangw-msft is there any information about new API?

mastappl avatar Apr 24 '17 06:04 mastappl

I encountered this as well and it took a while to figure out that the actual problem was not having permissions in the given location rather than specifying an unavailable VM size. The message in the portal is much clearer.

v-iam avatar Apr 27 '17 16:04 v-iam

FYI, the /skus api is being finalized by Azure Compute team which will return the permission and restrictions information which CLI can leverage for better errors/suggestions.

yugangw-msft avatar Apr 28 '17 17:04 yugangw-msft

Essentially each subscription has its own restrictions due to capacity or offer type, CLI will try to surface actionable messages with the assistance of the new API

yugangw-msft avatar Apr 28 '17 17:04 yugangw-msft

@yugangw-msft this RestAPI will be in Swagger right? So update to the compute package?

lmazuel avatar May 01 '17 18:05 lmazuel

@lmazuel , correct

yugangw-msft avatar May 01 '17 18:05 yugangw-msft

az vm list-skus is in so people can cross check themselves. For more integrated experience, 2 things should be done:

  1. on vm create, use the new api to cross check vm size and emit out a good message
  2. on vm availability-set create, use the same api to default FD to the maximum number

yugangw-msft avatar Aug 03 '17 00:08 yugangw-msft

This is still a problem... I cannot specify which SKU and this is very frustrating.

image

prashanthyv avatar Aug 23 '18 18:08 prashanthyv

When will this be fixed?

prashanthyv avatar Aug 23 '18 18:08 prashanthyv

@prashanthv did you use the vm list-skus command?

tjprescott avatar Aug 23 '18 18:08 tjprescott

Hi @tjprescott - Thanks. Yes I did. But the documentation doesn't tell the user after using the vm list-skus command what should be the next command to create a VM?

prashanthyv avatar Aug 23 '18 18:08 prashanthyv

@yugangw-msft can you take this one after Ignite?

tjprescott avatar Aug 23 '18 19:08 tjprescott

@tjprescott , @yugangw-msft. This issue hasn't been fixed. Do we have a solution. After doing list-skus command what is the next command we should use to create a VM?

prashanthyv avatar Aug 29 '18 00:08 prashanthyv

The flow, which we can emphasize in document, is you run “az vm list-skus -r virtualMachines -l -otable” and ensure the size you are using in the “az vm create” command is in the list. If you don’t want to pick a different size, your other option is to make a phone call to the support team so to lift the restriction.

yugangw-msft avatar Sep 04 '18 17:09 yugangw-msft