是否可以查看是什麼觸發了 Azure VM 重新啟動?

是否可以查看是什麼觸發了 Azure VM 重新啟動?

我收到了一些來自 Azure 的電子郵件通知,其中包含:

Activity log alert  Alert [Server Name] Health Status  
Properties {
    "title":"Reboot initiated from inside the machine",
    "details":"A reboot was triggered from inside the virtual machine. This could be due to a virtual machine operating system failure or as requested by an authorized user or process. The virtual machine will be back online after the reboot completes.",
    "currentHealthStatus":"Unavailable",
    "previousHealthStatus":"Unavailable",
    "type":"Downtime",
    "cause":"UserInitiated" }

這絕對不是“使用者啟動”,但可能是由 Windows 更新引起的,因為時間落在定義的“非工作時間”視窗內。

但是,有什麼方法可以在日誌中告訴觸發重啟的原因嗎?

答案1

查看「資源運作狀況」以查看歷史記錄中是否有任何其他事件。你是對的,如果它落入“非工作時間”窗口,則可能是 Windows 更新。在我們的環境中,當 Windows 更新觸發重新啟動時,我們會收到這些通知。

如果您想 100% 確定是 Windows 更新,請過濾系統事件日誌中的 ID 1074、6006 和 6008。它應該這樣說:

    The process C:\windows\system32\wbem\wmiprvse.exe (HOSTNAME) has initiated the restart of computer HOSTNAME on behalf of user NT AUTHORITY\SYSTEM for the following reason: No title for this reason could be found
 Reason Code: 0x80070015
 Shutdown Type: restart
 Comment: 

微軟本來可以加入一個原因,這樣就更容易確定原因...

答案2

您唯一/最好的機會是查看虛擬機器內部活動的任何日誌記錄。

Azure 告訴您(顯然對於任何閱讀的人來說),重新啟動是從 VM 內部觸發的。平台知識到此結束,虛擬機器要求重新啟動。

現在,您可能會在裡面找到更多信息,但很大程度上實際上取決於作業系統、設定和 - 最壞的情況 - 甚至沒有應用程式(即它們是否甚至記錄此資訊)。

你不會在 Azure 上找到任何東西,因為外部沒有任何知識。

另請注意:

這絕對不是“使用者啟動”,但可能是由 Windows 更新引起的,因為時間落在定義的“非工作時間”視窗內。

根據定義,從 Azure 環境的角度來看,VM 中執行的 Windows 更新是由使用者啟動的。使用者(即虛擬機器)請求重新啟動。因此,這絕對是用戶發起的。

相關內容