[英]Azure alert reboot vm on status busy
我正在尝试监视 VM 状态。 我已激活日志,并尝试查询 VM 的状态。 我找不到状态或健康状况。
要查询 Azure VM 的状态,请使用以下 PowerShell 命令:
Get-AzVM -Status | Select name, powerstate, provisioningState
Get-AzVM -Name "YourVmName" -ResourceGroup "YourResourceGroupName" -status
Resources
| project name, location,
PowerState=tostring(properties.extended.instanceView.powerState.code), type
| where type =~ 'Microsoft.Compute/virtualMachines'
| order by name desc
请注意,没有这样的 state 称为“忙碌” ,请查看此MS Doc 。
有关更多信息,请参阅以下参考资料:
powershell - 确定 Microsoft 中的虚拟机状态和活动 Azure - 堆栈内存溢出
如何使用 PowerShell 检查 Azure VM Power state? (tutorialspoint.com)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.