Resolve errors for resource quotas

This article describes resource quota errors that might occur when you deploy resources with an Azure Resource Manager template (ARM template) or Bicep file.

Symptom

If your template creates resources that exceed your Azure quotas, you might get the following error:

Code=OperationNotAllowed
Message=Operation results in exceeding quota limits of Core.
Maximum allowed: 4, Current in use: 4, Additional requested: 2.

Or, you might see this error:

Code=ResourceQuotaExceeded
Message=Creating the resource of type <resource-type> would exceed the quota of <number>
resources of type <resource-type> per resource group. The current resource count is <number>,
please delete some resources of this type before creating a new one.

Cause

Quotas are applied per resource group, subscriptions, accounts, and other scopes. For example, your subscription might be configured to limit the number of vCPUs for a region. If you attempt to deploy a virtual machine with more vCPUs than the permitted amount, you receive an error that the quota was exceeded.

For quota information, see Azure subscription and service limits, quotas, and constraints.

For Azure CLI, use the az vm list-usage command to find virtual machine quotas.

az vm list-usage --location "China East" --output table
Name                                      CurrentValue    Limit
----------------------------------------  --------------  -------
Availability Sets                         0               2500
Total Regional vCPUs                      0               100
Virtual Machines                          0               25000
Virtual Machine Scale Sets                0               2500
Dedicated vCPUs                           0               3000
Cloud Services                            0               2500
Total Regional Low-priority vCPUs         0               100
Standard BS Family vCPUs                  0               100
...

Solution

To request a quota increase, go to the portal and file a support issue. In the support issue, request an increase in your quota for the region into which you want to deploy.

Note

Remember that for resource groups, the quota is for each individual region, not for the entire subscription. If you need to deploy 30 cores in China North, you have to ask for 30 Resource Manager cores in China North. If you need to deploy 30 cores in any of the regions to which you have access, you should ask for 30 Resource Manager cores in all regions.

  1. Select Subscriptions.

    Screenshot of the Azure portal with search box and Subscriptions highlighted.

  2. Select the subscription that needs an increased quota.

    Screenshot of the Azure portal subscriptions list, highlighting a specific subscription link.

  3. Select Usage + quotas

    Screenshot of the subscription settings page, highlighting the 'Usage + quotas' option in the menu.

  4. In the upper right corner, select Request increase.

    Request increase

  5. Fill in the forms for the type of quota you need to increase after you complete the General information and Problem section.

    Screenshot of the 'Usage + quotas' page, showing the 'Request increase' button and a pencil icon indicating the option to specify a quota limit.