Hello @Rocky Mondal ,
Thank you for reaching out to Microsoft Q&A platform. Happy to answer your question.
Shut down causes/triggers:
Let’s brainstorm a few “usual suspects” that might shut down a VM:
- Azure Automation – yes, that’s what we were first looking at. Has it saved correctly? Are there any other runbooks executing first?
- Windows Update – settings on the server itself, Azure Update Management, or even a third party management tool (though in none of those scenarios would I expect it to happen every day, but I have seen stranger things!).
- Azure Dev/Test Labs – These pre-configured Azure Resource Manager templates let you specify auto shutdown (and auto start) times and policies for your Azure VMs.
- Something else controlling that server – think of a local script, application or third party management tool. Could the cause of the shut down be inside the VM itself and not related to Azure?
In your case, if you have ruled out all the above causes, you can check if there are any specific deallocated events being initiated by a service or user, you can check from activity logs in specific
Example :
If this is an abrupt shutdown from OS side, you can check for the critical errors in the windows event viewer logs->System logs around the time when the VM got shutdown. This will give you clues if this is initiated by Guest OS by any chance.
The last thing would most likely be a service issue that affected your virtual machine. If you go to Service Health in the Azure portal it should give you a detailed reason for what occurred here - https://learn.microsoft.com/en-us/azure/service-health/service-health-overview
Please "Accept as Answer" if any of above helped so that, it can help others in community looking for remediation for the similar issues.