To pick or not to pick Availability zone in VM creation

Gregorio Montaño 251 Reputation points
2022-08-03T11:29:16.88+00:00

Hi,

What are the advantages of picking an "Availability Zone" when creating a VM resource (compared to not selecting any)?

I have selected an "Availability Zone" when I created my VM resource (Standard D2s v3). It was stopped (deallocated) when I started the VM and got the error message below,

The resource operation completed with terminal provisioning state 'Failed'.\",\"details\":[{\"code\":\"ZonalAllocationFailed\",\"message\":\"Allocation failed. We do not have sufficient capacity for the requested VM size in this zone.

Trying again after several minutes started the VM successfully.

How do i prevent such error from happening again?

Thanks and have a nice day!

Related reference:
https://learn.microsoft.com/en-us/azure/virtual-machines/create-portal-availability-zone?tabs=standard

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

Accepted answer
  1. Jackson Martins 10,606 Reputation points MVP Volunteer Moderator
    2022-08-03T11:41:26.993+00:00

    Hi @Gregorio Montaño

    Azure availability zones are physically separate locations within each Azure region that are tolerant to local failures.

    When you create a VM without the Availability Zone or Availability Set, it is not possible to configure the vm for the VMSS (Virtual Machine Scale Set) which is the high availability of your VM.

    • The error you mentioned is because at the time of allocation there were no resources available in that zone

    If use Availability Set.

    try to Navigate to Home > Virtual machines, add an Availability set filter and then select Group by availability set. Select all applicable VMs and click Start. This will make sure that a new allocation attempt is run and that a new cluster can be selected that has sufficient capacity.

    If you are using availability zones, try another zone within the region that may have available capacity for the requested VM size.

    Reference: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/allocation-failure
    Reference: https://learn.microsoft.com/en-us/azure/availability-zones/az-overview

    Best

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.