'Get Azure VM size limits like throughput and IOPS

I´m not able to find any PowerShell command to get the IOPS / Throughput limits based on the different VM sizes.

E.g. If using Get-AzVMSize the limit of how many disks the VM can have but not the metrics like "Max temp storage throughput: IOPS/Read MBps/Write MBps", "Max data disks/throughput: IOPS", "Expected network bandwidth (Mbps)", and "Max NICs" that can be found in the documentation.

Is there such a command to get the information that is in the documentation?

https://docs.microsoft.com/en-us/azure/virtual-machines/dv2-dsv2-series-memory



Solution 1:[1]

How about this?

PS C:\Users\raj> $sku = (Get-AzComputeResourceSku | where {$_.Locations.Contains($region) -and ($_.Name -eq $vmSize) })


PS C:\Users\raj> $sku

ResourceType                 Name Location     Zones Restriction          Capability Value
------------                 ---- --------     ----- -----------          ---------- -----
virtualMachines Standard_E80is_v4   eastus {1, 3, 2}             MaxResourceVolumeMB     0



PS C:\Users\raj> $sku.Capabilities

Name                          Value        
----                          -----        
MaxResourceVolumeMB           0            
OSVhdSizeMB                   1047552      
vCPUs                         80           
HyperVGenerations             V1,V2        
MemoryGB                      504          
MaxDataDiskCount              32           
LowPriorityCapable            True         
PremiumIO                     True         
VMDeploymentTypes             IaaS,PaaS    
vCPUsAvailable                80           
vCPUsPerCore                  2            
CombinedTempDiskAndCachedIOPS 615000       
CachedDiskBytes               1717986918400
UncachedDiskIOPS              80000        
UncachedDiskBytesPerSecond    1258291200   
EphemeralOSDiskSupported      False        
EncryptionAtHostSupported     True         
CapacityReservationSupported  False        
AcceleratedNetworkingEnabled  True         
RdmaEnabled                   False        
MaxNetworkInterfaces          8            

Solution 2:[2]

Get-AzVMSize cmd provides all the information about Virtual Machine sizes.

But As far as I know, PowerShell isn't going to pull theoretical information. It might get current information for a VM, but not maxes.

That would be found in the docs such as this: VM Network Throughput

Solution 3:[3]

I opened a support case with Microsoft and confirmed that as of Nov 2020 there is no API available (CLI, Powershell, or even REST) which contains VM throughput limit information.

The only authoritative sources for this info are the Markdown tables in the Microsoft documentation you already noted. The Markdown is kept at https://github.com/MicrosoftDocs/azure-docs/tree/master/articles/virtual-machines.

While definitely a sub-optimal solution, parsing the authoritative Markdown tables to populate your own local lookup table for this info would work.

Solution 4:[4]

You can obtain, programmatically, a better (json) output using AZ CLI. The specific command I used is az vm list-skus . With the following command you can extract all VMs capabilities from WestEurope Region.

az vm list-skus -l westeurope --resource-type virtualMachines --all true

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Florian Winter
Solution 2 Monika Reddy
Solution 3 Steve Bonds
Solution 4 Giulio Fronterotta