通过Python脚本查看Azure中虚拟机的故障和更新域 [英] View Fault and Update Domains of virtual machine in Azure through Python Script
本文介绍了通过Python脚本查看Azure中虚拟机的故障和更新域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么办法可以通过python脚本获取特定vm的更新域和故障域.
Is there any way i can get the update domain and fault domain of the particular vm through python script.
我不想使用Powershell命令.
I don't want to use powershell commands.
<<在Power Shell中,我们可以执行此操作>>
<< In Power Shell we can do this >>
http://windowsitpro.com/azure/view-fault-and-update-domains-azure-resource-manager
<</电源外壳>>
<< /Power Shell >>
我正在寻找Azure python cli.可以完成这项任务.
I am looking for azure python cli. which can do this task.
推荐答案
也许您可以使用以下命令
Maybe you could use the following command
az vm show -g yourgroup -n vmname --expand instanceView
您可以获取VM的platformFaultDomain
和platformUpdateDomain
这篇关于通过Python脚本查看Azure中虚拟机的故障和更新域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文