Virtual Machine stopped unexpectedly

Imran Shah 0 Reputation points
2024-10-01T10:26:41.09+00:00

Hello There,

I have been using Azure VM for about a year now in production. I have experienced unexpected VM shutdown/unreachability twice in last 2 weeks.

  1. The "Activity Log" reports "List changes of a single resource" message.
  2. VM dashboard reports the VM as "running"
  3. Domains connected to the VM cannot connect to the VM
  4. After manually restarting VM, it does work
  5. All of the apps are running inside Docker
  6. Following are the details from Activity Log, when the issue happens
       {
           "authorization": {
               "action": "Microsoft.ChangeAnalysis/resourceChanges/action",
               "scope": "/subscriptions/7a869d1f-95dc-45bf-99a4-daa2d85a7cf6"
           },
           "caller": "imran.shah@zikomosolutions.com",
           "channels": "Operation",
           "claims": {
               "aud": "https://management.core.windows.net/",
               "iss": "https://sts.windows.net/0032aa86-9cbb-418f-8b7f-859ef3b04d0e/",
               "iat": "1727692928",
               "nbf": "1727692928",
               "exp": "1727697283",
               "http://schemas.microsoft.com/claims/authnclassreference": "1",
               "aio": "AYQAe/8YAAAAcpWcA9fH2DA+BKA5lph1gz3vJhp/eV9whP/V/D2d526pXF11VFuJr5oi8B6RGijZkM/0hsMTY8/BRErwUYeuik+T6Jy9iCAvugvX/nadcAKRiUqMXQxxVZ95qWddzjil7Xsfe5voTy4fGPlv6XVXhyLYHpC2+jWjiiJPQfRGirs=",
               "altsecid": "1:live.com:00037FFE3F2C5063",
               "http://schemas.microsoft.com/claims/authnmethodsreferences": "pwd,mfa",
               "appid": "c44b4083-3bb0-49c1-b47d-974e53cbdf3c",
               "appidacr": "2",
               "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress": "imran.shah@zikomosolutions.com",
               "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname": "Shah",
               "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname": "Imran",
               "groups": "41e40211-c7e7-48f6-a938-4661602f4039,40fb8427-22ce-4d45-9f77-d761408375d9,0831ee34-9c23-43b8-b6b0-b3ed0f976bd8,113d6090-b266-467b-bad0-3f06970548ab,aa8ff8bf-20de-40c7-8d5f-f9a7db72fae5,83721dcc-2c60-4fe9-8c9b-b23883ba092e,8471fdce-e479-4402-bbe4-7fda893f2dea,7f45a5d8-1c7f-448b-a520-b50023d00e85",
               "http://schemas.microsoft.com/identity/claims/identityprovider": "live.com",
               "idtyp": "user",
               "ipaddr": "61.0.43.118",
               "name": "imran.shah",
               "http://schemas.microsoft.com/identity/claims/objectidentifier": "747425ef-e981-4911-89cb-ad94c7977f94",
               "puid": "1003200220F3C39B",
               "rh": "0.AWAAhqoyALucj0GLf4We87BNDkZIf3kAutdPukPawfj2MBNgAMU.",
               "http://schemas.microsoft.com/identity/claims/scope": "user_impersonation",
               "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier": "9K2J9O3OmJECIYdBe5FceIZOsrctEEHjx9cLU-mlzaQ",
               "http://schemas.microsoft.com/identity/claims/tenantid": "0032aa86-9cbb-418f-8b7f-859ef3b04d0e",
               "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name": "live.com#imran.shah@zikomosolutions.com",
               "uti": "KiuYxBD7OkSeI4r6yXM_AA",
               "ver": "1.0",
               "wids": "fdd7a751-b60b-444a-984c-02652fe8fa1c,d37c8bed-0711-4417-ba38-b4abe66ce4c2,8329153b-31d0-4727-b945-745eb3bc5f31,e3973bdf-4987-49ae-837a-ba8e231c7286,fe930be7-5e62-47db-91af-98c3a49a38b1,b0f54661-2d74-4c50-afa3-1ec803f12efe,112ca1a2-15ad-4102-995e-45b0bc479a6a,62e90394-69f5-4237-9190-012177145e10",
               "xms_edov": "true",
               "xms_idrel": "16 1",
               "xms_tcdt": "1601985630"
           },
           "correlationId": "3855fd27-3e80-467a-af96-6c32d7850c2c",
           "description": "",
           "eventDataId": "27100922-19f0-46dd-aeaf-6b41db8b7181",
           "eventName": {
               "value": "EndRequest",
               "localizedValue": "End request"
           },
           "category": {
               "value": "Administrative",
               "localizedValue": "Administrative"
           },
           "eventTimestamp": "2024-09-30T10:49:17.4620483Z",
           "id": "/subscriptions/7a869d1f-95dc-45bf-99a4-daa2d85a7cf6/providers/Microsoft.ChangeAnalysis/events/27100922-19f0-46dd-aeaf-6b41db8b7181/ticks/638632901574620483",
           "level": "Error",
           "operationId": "5437759d-c100-42ec-b783-d21294b25a45",
           "operationName": {
               "value": "Microsoft.ChangeAnalysis/resourceChanges/action",
               "localizedValue": "List changes of a single resource"
           },
           "resourceGroupName": "",
           "resourceProviderName": {
               "value": "Microsoft.ChangeAnalysis",
               "localizedValue": "Microsoft.ChangeAnalysis"
           },
           "resourceType": {
               "value": "",
               "localizedValue": ""
           },
           "resourceId": "/subscriptions/7a869d1f-95dc-45bf-99a4-daa2d85a7cf6/providers/Microsoft.ChangeAnalysis",
           "status": {
               "value": "Failed",
               "localizedValue": "Failed"
           },
           "subStatus": {
               "value": "BadRequest",
               "localizedValue": "Bad Request (HTTP Status Code: 400)"
           },
           "submissionTimestamp": "2024-09-30T10:50:48Z",
           "subscriptionId": "7a869d1f-95dc-45bf-99a4-daa2d85a7cf6",
           "tenantId": "0032aa86-9cbb-418f-8b7f-859ef3b04d0e",
           "properties": {
               "statusCode": "BadRequest",
               "serviceRequestId": null,
               "statusMessage": "{\"error\":{\"code\":\"BadRequest\",\"message\":\"Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')\\r\\n\\r\\nTraceId: 00-0e43eae1d8f9839e4965250a8dff6f33-e334cb82f2519af0-01.\"}}",
               "eventCategory": "Administrative",
               "entity": "/subscriptions/7a869d1f-95dc-45bf-99a4-daa2d85a7cf6/providers/Microsoft.ChangeAnalysis",
               "message": "Microsoft.ChangeAnalysis/resourceChanges/action",
               "hierarchy": "7a869d1f-95dc-45bf-99a4-daa2d85a7cf6"
           },
           "relatedEvents": []
       }	
    

As the issue is affecting my production server, quick help from the experts is kindly requested.

Thank you.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,988 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Akshay kumar Mandha 1,040 Reputation points Microsoft Vendor
    2024-10-01T21:23:29.39+00:00

    Hi Imran Shah,
    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    I understand your concern, and there could be a few reasons why your Azure VM is shutting down unexpectedly. Sometimes, Azure performs scheduled maintenance or updates that might cause automatic reboots. If you have auto-shutdown set up, the VM will turn off at specific times you’ve configured. There could also be issues with the underlying infrastructure that Azure detects, prompting a shutdown.

    If your VM is part of a scale set, Azure may shut down some instances to balance the load or apply updates. Automatic system updates can cause restarts, and hitting resource limits like CPU or memory quotas might also lead to unexpected shutdowns.

    If the dashboard shows the VM is running, try checking its status through Azure CLI or PowerShell to see if it’s a glitch with the UI. Also, look into any Azure Automation runbooks related to this VM, as they might be affecting its operation.

    It’s also a good idea to review the diagnostics logs and use Azure Monitor to gather more information about what’s happening with the VM. This can provide insights into performance and any alerts that might indicate issues.
    Please refer this document Method Run diagnostics and also refer this blog See the section Shut down causes/triggers

    If you found this helpful, please click an accepting the answer and "Upvote" on my post please let us know if have any further query will always assist you
    User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.