VM with AZ set to None - how to check its zone

Assaf L 287 Reputation points
2022-12-26T17:43:58.57+00:00

I have a virtual machine which was created without a specific zone
Is there an option to tell which zone is it located at?

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

Accepted answer
  1. srbhatta-MSFT 8,586 Reputation points Microsoft Employee
    2022-12-27T10:13:32.49+00:00

    Hello @Assaf L ,
    Welcome to Microsoft QnA.
    Availability zones are isolated locations within an Azure region that are designed to offer higher availability for your workloads. Each availability zone consists of one or more data centers that are equipped with independent power, networking, and cooling.

    So, if your Azure virtual machine (VM) has an availability zone set to "None," it means that it is not part of an availability zone.

    To determine the availability zone, you can run the following command from the Azure cli:

    az vm show --resource-group <resource-group-name> --name <vm-name> --query "zones" --output tsv  
    

    If the command does not return anything or returns an empty string, it means that the VM is not part of an availability zone.

    However, as mentioned above by Michael, you can check the region in which your VM is running either from the portal or by running the below command via Azure cli.

    az vm show --resource-group <resource-group-name> --name <vm-name> --query "[resourceGroup, location]" --output tsv  
    

    The location returned by this command is the region in which the VM is located.

    Hope that answers your question.

    --------
    Please accept as answer if the above information is helpful.

    1 person found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Michael Durkan 12,241 Reputation points MVP
    2022-12-26T18:53:52.253+00:00

    Hi

    run this command from Azure CLI:

    az vm show -n "YourVMName" -g "YourResourceGroupName" --query '[location]' -otsv

    It should also give you this info in the Azure Portal blade for the VM in the main properties page.

    Hope this helps,

    Thanks

    Michael Durkan

    • If the reply was helpful please upvote and/or accept as answer as this helps others in the community with similar questions. Thanks!
    0 comments No comments

  2. Tuan LE 81 Reputation points
    2022-12-28T05:32:55.747+00:00

    Zone and Region are not the same thing, but they're closely related. In a Region that supports Availability Zones, that Region is divided into Zones and each Zone contains more than one datacenter. In a Region that does not support Availability Zone (yet), all datacenters in that Regions are considered equivalent.

    When you deploy a VM into a Region that does not support Availability Zones, or you don't select a particular Zone in a supported Region, then your VM is not zone-redundant and there will be no Zone info to check. But still, again, you can always know in which Region your VM is located.

    0 comments No comments

  3. Assaf L 287 Reputation points
    2022-12-28T08:55:47.287+00:00

    Hi,
    The CLI returns value of None
    Although its not exactly None since the VM is located in one of a region's data centers, I can understand that the exact location doesn't matter and can change whenever VM is allocated

    Thank you for your inputs

    0 comments No comments

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.