MantyQuestions
MantyQuestions

Reputation: 369

How to get family of azure VM via VM size az cli

I am looking to get the name of the VM family of a specific VM type via the az cli.

Sample input:

Standard_D16ds_v4

Sample output:

Standard DDSv4 Family vCPUs

Is this possible to do either via az cli or azure RM?

Upvotes: 1

Views: 985

Answers (2)

bear454
bear454

Reputation: 1

You can use the list-skus subcommand to find this:

$ az vm list-skus --size Standard_D16ds_v4 --query [].family
[
  "standardDDSv4Family"
]

https://learn.microsoft.com/en-us/cli/azure/vm?view=azure-cli-latest#az-vm-list-skus

Upvotes: 0

Sajeetharan
Sajeetharan

Reputation: 222522

You can use this one,

az vm show -g 'YourResourceGroupName' -n 'VMName' --query 'hardwareProfile.vmSize' -o tsv

Upvotes: 1

Related Questions