简体   繁体   English

如何通过 VM 大小 az cli 获取 azure VM 系列

[英]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.我希望通过 az cli 获取特定 VM 类型的 VM 系列的名称。

Sample input:示例输入:

Standard_D16ds_v4

Sample output:样本 output:

Standard DDSv4 Family vCPUs

Is this possible to do either via az cli or azure RM?这可以通过 az cli 或 azure RM 来完成吗?

You can use this one,你可以用这个,

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

You can use the list-skus subcommand to find this:您可以使用list-skus子命令来查找:

$ 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 https://learn.microsoft.com/en-us/cli/azure/vm?view=azure-cli-latest#az-vm-list-skus

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM