Services start/stop automatically in azure

GVS 146 Reputation points

Hi , Anyone please help me to know how to start a service if stopped in windows azure VM automatically without manual intervention

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

3 answers

Sort by: Most helpful
  1. T. Kujala 8,706 Reputation points

    Hi @AzureisMyCareer-5423,

    Open the Service management console on the server.

    Start --> Run --> services.msc

    Select the correct service and the Recovery tab.

    Select First failure --> Restart the Service.


    0 comments No comments

  2. Anonymous

    Much more bullet proof method is to script it something like this and run as a periodic scheduled task.

    --please don't forget to Accept as answer if the reply is helpful--

    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

  3. shivakumarky 1 Reputation point


    Even i have not came across any solution so far to start services when they got stopped. One solution is to configure restart service on failure and i was thinking of building below solution.

    1. Implement Change Tracking in Automation Account for your VM's which are reporting to workspace
    2. Create a Log analytics alert to trigger the alert whenever any VM service goes down. Instead of triggering the email alert, trigger a runbook action.
    3. Configure the runbook to utilize common schema alert and based on the values in the alert, runbook should invoke the "run command" on VM directly to start the service which is stopped. Or we can try to use custom script extension or desired state configuration based on our solution requirement.
    4. If the runbook could not start the service then it should trigger the alert to IT Team to check and resolve the issue.

    Below is the link with similar solution implemented by Github team :