My Azure Virtual Machine Won’t Start

To benefit from elasticity on Microsoft Azure, we regularly leverage strategies that utilize Azure Automation to shut down and de-allocate Virtual Machines when they are not needed.

This strategy is excellent and usually works on pretty well. Due to Azure’s highly dynamic nature, the allocation of Large Virtual Machines can sometimes pose a challenge in the form of “The server encountered an internal error. Please retry the request.” or “Failed to produce an allocation for the service.“.

These error messages definitely cause much frustration, because we don’t understand their nature. A blog post written by Lichun Li a Program Manager in the Microsoft Azure product group helps us understand Allocation Failures and how to fix them.

The scenarios that described in her post, teach us about how things work under the hood. It also tells us that creating new resources is often easier than to restart a stopped (de-allocated) resource. By using automation to provision our Virtual Machines, we can take a page our of the Azure Batch and Azure Data Factory playbooks. Both of these services create brand new environments for the duration of our compute jobs. Once they are done, the compute environments are destroyed and the resources are released for everyone’s benefit.

On Azure, there are many ways to provision Virtual Machines, let’s walk through a couple of our options.

Now, I understand that leveraging automation based on Configuration as Code requires thought, planning and effort. And we’re not all in a position to drop what we are doing to automate everything. So here’s a quick fix for your current situation.

Quick Fix

To start a Virtual Machine that continuously fails to start, try to resize it. Be mindful of the number of Data Disks and make sure that you do scale to a tier that supports enough attached disks. This configuration change will force the Azure Fabric to seek new physical resources for your workload.

One way to deal with the maximum number of attached disks, is to scale the Virtual Machine to an equivalent configuration in another tier. For example, if my Virtual Machine is a Standard A4, I can scale it to a Standard D4 and then back to its original configuration.

For more details about virtual machines capacities, see Sizes for virtual machines.

Trackbacks and Pingbacks:

  1. Build it, Use it, Destroy it! « Alexandre Brisebois ☁ - October 17, 2015

    […] a lot of options when it comes to provisioning environments and resources. In my last post about troubleshooting Virtual Machine allocations, I enumerated a few of these options and briefly mentioned that I favored destroying environments […]


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.