generate SMS alert on VM state of Failed is this possible?

Rich Roy 26 Reputation points
2021-10-25T15:42:53.16+00:00

Like most folks I get a ton of notifications regarding my VMs in Azure across multiple subscriptions etc. they powered on they powered off etc, loads of jobs that run and so on. Today I had 2 VMs that were in a "failed" state. Looking into the message it said something about not enough resources in the region (west us). Be that as it may, is there a way to create an SMS alert for this VM state of failed only? I tried running thru the Alerts in Azure but there was nothing under Virtual Machines that looks to me like an event that could trigger the alert. I reached out to Azure support and they suggested posting here as well.

Thanks in advance!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,114 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,113 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Pradeep Kommaraju 2,546 Reputation points
    2021-10-27T00:43:05.05+00:00

    Hi @Rich Roy

    Thanks for reaching out to Microsoft Q&A Platform .

    Let me break my response in three parts here :

    When does a VM go into a "Failed" state ?
    When ever there is an update operation on the VM which eventually failed with X reason { In your case capacity } , The VM Might land into this inconstant state .

    How an i recover VM provisioning state from Failed to Succussed ?
    We will need to review the failure and troubleshoot/act on it accordingly

    How can we Monitor all the failed operations on VM's and get notifications ?
    Step 1 : Navigate to Alerts section of the VM and select Activity log-Administrative for CRUD :

    144001-image.png

    Step 2 : Set Up alerting for only failed events :

    143965-image.png

    This should alert you with when ever any update on the VM fails.

    Hope this solution helps in your case , If so kindly accept the answer so that it can be useful for the community .

    Thanks & Regards,
    Pradeep

    0 comments No comments

  2. Rich Roy 26 Reputation points
    2021-11-01T17:35:49.357+00:00

    thanks for the very detailed response. It was most helpful. It does appear though you are possibly using a preview feature and I am not. I do not get the same wizard you show, nor do i have the option to configure actions. I will keep looking