API returns wrong number of Cores

Mateusz Aszyk 1 Reputation point

When I tried to get a number of Cores from AZ CLI or Python SDK then I got the wrong value.

Did you know about it?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,380 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Mateusz Aszyk 1 Reputation point


    First scenario:

    The simplest reproducing is running the command:

    az vm list-sizes -l westeurope -o json

    Then the command return:

        "maxDataDiskCount": 32,
        "memoryInMb": 262144,
        "name": "Standard_E32-8s_v3",
        "numberOfCores": 32,
        "osDiskSizeInMb": 1047552,
        "resourceDiskSizeInMb": 524288

    The second scenario is when I tried called to API by Python.

    I used method list from VirtualMachineSizesOperations and the number is the same.

    Both scenarios are run in West and North Europe.


  2. vipullag-MSFT 25,441 Reputation points

    @Anonymous Apologies for the delay in getting back on this.
    Thanks for sharing the details.

    As per this document for Standard_E4s_v3 cores are 4 and also this VM size has the Constrained core sizes availability.
    In the Constrained vCPU capable VM sizes document CPU mentioned from Standard_E4-2s_v3 is 2.

    As per the Constrained vCPU capable VM sizes document, The vCPU count can be constrained to one half or one quarter of the original VM size. These new VM sizes have a suffix that specifies the number of active vCPUs to make them easier for you to identify.

    I have checked this Azure CLI and see that the cores returned from the CLI response is the original cores for the Standard_E4s_v3 and not the Constrained size.

    I have reached to internal team to get more information on this. I will update you back on this.