Azure Virtual Machine (VM) is shutting down or stopping unexpectedly.

salman khan 0 Reputation points
2025-04-11T15:44:52.3133333+00:00

Azure Virtual Machine (VM) is shutting down or stopping unexpectedly, even though Auto-shutdown is disabled in the "Operations" settings.

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

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Arko 4,150 Reputation points Microsoft External Staff Moderator
    2025-05-14T11:48:26.85+00:00

    Hello salman khan, your VM is configured as a Spot VM, and unexpected shutdowns are expected behavior due to the nature of Spot allocation in Azure.

    spot1

    Based on the details you've shared so far I can see your VM is defined with the following properties- "priority": "Spot", "evictionPolicy": "Deallocate" and "billingProfile": { "maxPrice": -1}

    These settings indicate your VM is a Spot instance, which is evicted automatically by Azure when there is insufficient capacity in your selected region or zone as Azure prioritizes regular (pay-as-you-go) VMs

    The Spot price exceeds your max price (in your case, -1 means "always accept current price")

    This is why your APIs suddenly went down and the VM was deallocated without notice, and this bypasses the auto-shutdown setting. If you want consistency with your VM then go for pay as you go VMs.

    Reference document- https://learn.microsoft.com/en-us/azure/virtual-machines/spot-vms#eviction-policy

    Hope I was able to clear your query here. It would be great if you could kindly accept the answer so that anyone else having similar query on MS QnA forum can refer to it. Thanks


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.