使用 Azure PowerShell 检查 vCPU 配额Check vCPU quotas using Azure PowerShell

虚拟机和虚拟机规模集的 vCPU 配额已根据每个区域中的每个订阅划分成两层。The vCPU quotas for virtual machines and virtual machine scale sets are arranged in two tiers for each subscription, in each region. 第一层是区域的 vCPU 总数,第二层是各种 VM 大小系列核心(如 D 系列 vCPU)。The first tier is the Total Regional vCPUs, and the second tier is the various VM size family cores such as the D-series vCPUs. 每当部署新 VM 时,VM 的 vCPU 数不能超过 VM 大小系列的 vCPU 配额或区域 vCPU 配额总数。Any time a new VM is deployed the vCPUs for the VM must not exceed the vCPU quota for the VM size family or the total regional vCPU quota. 如果超过了上述任一配额,将不允许部署 VM。If either of those quotas are exceeded, the VM deployment will not be allowed. 此外,区域中的虚拟机总数也有一个配额。There is also a quota for the overall number of virtual machines in the region. 可以在 Azure 门户的“订阅”页的“用量 + 配额”部分中查看其中每项配额的详细信息,或者,可以使用 PowerShell 查询这些值。 The details on each of these quotas can be seen in the Usage + quotas section of the Subscription page in the Azure portal, or you can query for the values using PowerShell.

备注

配额基于所使用的核心总数(已分配和已解除分配)进行计算。Quota is calculated based on the total number of cores in use both allocated and deallocated. 如果需要额外核心,则请求增加配额或删除不再需要的 VM。If you need additional cores, request a quota increase or delete VMs that are no longer needed.

检查使用情况Check usage

可以使用 Get-AzVMUsage cmdlet 来检查配额的使用情况。You can use the Get-AzVMUsage cmdlet to check on your quota usage.

Get-AzVMUsage -Location "China East"

输出类似于以下内容:The output will look similar to this:

Name                             Current Value Limit  Unit
----                             ------------- -----  ----
Availability Sets                            0  2000 Count
Total Regional vCPUs                         4   260 Count
Virtual Machines                             4 10000 Count
Virtual Machine Scale Sets                   1  2000 Count
Standard B Family vCPUs                      1    10 Count
Standard DSv2 Family vCPUs                   1   100 Count
Standard Dv2 Family vCPUs                    2   100 Count
Basic A Family vCPUs                         0   100 Count
Standard A0-A7 Family vCPUs                  0   250 Count
Standard D Family vCPUs                      0   100 Count
Standard DS Family vCPUs                     0   100 Count
Standard F Family vCPUs                      0   100 Count
Standard FS Family vCPUs                     0   100 Count
Standard Av2 Family vCPUs                    0   100 Count
Standard Dv2 Promo Family vCPUs              0   100 Count
Standard DSv2 Promo Family vCPUs             0   100 Count
Standard Dv3 Family vCPUs                    0   100 Count
Standard DSv3 Family vCPUs                   0   100 Count
Standard Ev3 Family vCPUs                    0   100 Count
Standard ESv3 Family vCPUs                   0   100 Count
Standard FSv2 Family vCPUs                   0   100 Count
Standard NCv3 Family vCPUs                   0     0 Count
Standard Storage Managed Disks               2 10000 Count
Premium Storage Managed Disks                1 10000 Count

后续步骤Next steps

有关计费和配额的详细信息,请参阅 Azure 订阅和服务限制、配额与约束For more information about billing and quotas, see Azure subscription and service limits, quotas, and constraints.