【问题标题】:Using powershell can we do automation script to auto restart the azure vm agent if the agent is not responding?如果代理没有响应,我们可以使用 powershell 执行自动化脚本来自动重启 azure vm 代理吗?
【发布时间】:2019-11-04 07:09:20
【问题描述】:

1) 验证 Azure VM 代理状态 2) 如果状态良好,不需要重新启动代理。如果状态解除,需要重新启动代理。

【问题讨论】:

  • not good 是什么意思?虚拟机解除分配?
  • 是的,已分配.....

标签: azure powershell virtual-machine


【解决方案1】:

您应该首先检测是否安装了 VM 代理:

Get-AzVM

结果:

OSProfile                  :
  ComputerName             : myVM
  AdminUsername            : myUserName
  WindowsConfiguration     :
    ProvisionVMAgent       : True
    EnableAutomaticUpdates : True

Azure VM 代理可能已停止、已过时、处于不一致状态或未安装并阻止 Azure 备份服务触发快照。

  1. 如果 VM 代理已停止或处于不一致状态,请重新启动 代理并重试备份操作(尝试临时备份)。为了 重启代理的步骤,见Windows VMsLinux VMs

  2. 如果 VM 代理未安装或已过时,请安装/更新 VM 代理并重试备份操作。有关安装/更新的步骤 代理,请参阅 Windows VMsLinux VMs

为了在 Linux 上运行进程,请遵循以下步骤:

https://docs.microsoft.com/en-us/azure/virtual-machines/linux/run-command

窗户:

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/run-command


参考: https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/agent-windows#detect-the-vm-agent

https://docs.microsoft.com/en-us/azure/backup/backup-azure-troubleshoot-vm-backup-fails-snapshot-timeout#UserErrorGuestAgentStatusUnavailable-vm-agent-unable-to-communicate-with-azure-backup

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多