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:
Output
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:
Output
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 Azure CLI, use the az vm list-usage command to find virtual machine quotas.
Azure CLI
az vm list-usage --location"West US"--output table
Output
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
...
For PowerShell, use the Get-AzVMUsage cmdlet to find virtual machine quotas.
Azure PowerShell
Get-AzVMUsage -Location"West US"
Output
Name Current Value Limit Unit
---- ------------- ----- ----
Availability Sets 0 2500 Count
Total Regional vCPUs 0 100 Count
Virtual Machines 0 25000 Count
Virtual Machine Scale Sets 0 2500 Count
Dedicated vCPUs 0 3000 Count
Cloud Services 0 2500 Count
Total Regional Low-priority vCPUs 0 100 Count
Standard BS Family vCPUs 0 100 Count
...
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.
Some quotas let you specify a quota limit that's submitted for review and either approved or rejected. If your limit is rejected, you'll see a link to open a support request.
Notă
Remember that for resource groups, the quota is for each individual region, not for the entire
subscription. If you need to deploy 30 vCPUs in West US, you have to ask for 30 Resource Manager
vCPUs in West US. If you need to deploy 30 vCPUs in any of the regions to which you have access,
you should ask for 30 Resource Manager vCPUs in all regions.
Schreiben Sie effiziente Abfragen, erstellen Sie Indizierungsrichtlinien, verwalten Sie und Sie Ressourcen in der SQL-API und im SDK mit Microsoft Azure Cosmos DB bereit.
Erfahren Sie, wie Sie eine Erhöhung des vCPU-Kontingentgrenzwerts für eine VM-Familie im Azure-Portal anfordern, wobei der vCPU-Grenzwert für die gesamte Region um denselben Wert erhöht wird.