View Fault and Update Domains of virtual machine i

2019-03-01 05:20发布

问题:

Is there any way i can get the update domain and fault domain of the particular vm through python script.

I don't want to use powershell commands.

<< In Power Shell we can do this >>

http://windowsitpro.com/azure/view-fault-and-update-domains-azure-resource-manager

<< /Power Shell >>

I am looking for azure python cli. which can do this task.

回答1:

Maybe you could use the following command

az vm show -g yourgroup -n vmname --expand instanceView

You could get your VM's platformFaultDomain and platformUpdateDomain