Reputation: 1511
I need to fetch a list of Azure vm sizes that supports Premium disk. I tried the 'get-azvmsize' but it does not have a property for 'Premium disk support'.
Command does not give 'premium disk support' property.
$data = get-azvmsize -ResourceGroupName Demo-eu-rsv-dev -VMName eusvm1dev
PS /home/cstx_a_manjug> $data
Name NumberOfCores MemoryInMB MaxDataDiskCount OSDiskSizeInMB ResourceDiskSizeInMB
---- ------------- ---------- ---------------- -------------- --------------------
Standard_B1ls 1 512 2 1047552 4096
Standard_B1ms 1 2048 2 1047552 4096
Standard_B1s 1 1024 2 1047552 4096
Upvotes: 0
Views: 785
Reputation: 16438
Based on PSVirtualMachineSize Class, there is no such a property for 'Premium disk support'. So I'm afraid that we can't get 'Premium disk support' through this cmd.
Currently we need to use List Resource SKUs to get the VM size information.
{
"name": "PremiumIO",
"value": "True"
}
This property PremiumIO
is 'Premium disk support'. Unfortunately only location filter is supported currently based on URI Parameters. So the response data is very large. You need to deal with it in your code to filter "resourceType" as "virtualMachines" and "PremiumIO" as "True".
There is indeed a corresponding Powershell cmd Get-AzComputeResourceSku.
Here is an example:
Get-AzComputeResourceSku | where{$_.ResourceType.Equals('virtualMachines') -and $_.Locations.Contains('westus').Equals($true) -and $_.Capabilities.where({($_.Value -eq 'True') -and ($_.Name -eq 'PremiumIO')})}| Select-Object Name, Capabilities, ResourceType, Locations
Upvotes: 2