使用 Azure CLI 检查 vCPU 配额Check vCPU quotas using the Azure CLI

虚拟机和虚拟机规模集的 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 门户的“订阅”页的“使用情况 + 配额”部分中查看,也可以使用 Azure CLI 查询值。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 the Azure CLI.

备注

配额基于所使用的核心总数(已分配和已解除分配)进行计算。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

可以使用 az vm list-usage 检查配额用量。You can check your quota usage using az vm list-usage.

az vm list-usage --location "China East" -o table

输出应类似于:The output should look something like this:

Name                                CurrentValue    Limit
--------------------------------  --------------  -------
Availability Sets                              0     2000
Total Regional vCPUs                          29      100
Virtual Machines                               7    10000
Virtual Machine Scale Sets                     0     2000
Standard DSv3 Family vCPUs                     8      100
Standard DSv2 Family vCPUs                     3      100
Standard Dv3 Family vCPUs                      2      100
Standard D Family vCPUs                        8      100
Standard Dv2 Family vCPUs                      8      100
Basic A Family vCPUs                           0      100
Standard A0-A7 Family vCPUs                    0      100
Standard DS Family vCPUs                       0      100
Standard F Family vCPUs                        0      100
Standard FS Family vCPUs                       0      100
Standard Storage Managed Disks                 5    10000
Premium Storage Managed Disks                  5    10000

后续步骤Next steps

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