Bird
Raised Fist0
Azurecloud~5 mins

Azure global infrastructure (regions, availability zones) - Commands & Configuration

Choose your learning style10 modes available
Introduction
Azure global infrastructure is a network of data centers around the world. It helps keep your apps running smoothly by placing resources close to users and protecting them from failures.
When you want your app to respond quickly to users in different countries by placing resources nearby.
When you need to keep your app running even if one data center has a problem.
When you want to store data in a specific country to follow local rules.
When you want to spread your app across multiple locations to handle more users.
When you want to back up your app in a different place to avoid losing data.
Commands
This command lists all Azure regions where you can create resources. It helps you see the available locations worldwide.
Terminal
az account list-locations --output table
Expected OutputExpected
Name DisplayName -------------------- ------------------------- eastus East US westus West US westeurope West Europe southeastasia Southeast Asia japaneast Japan East ... ...
→
--output table - Shows the output in a readable table format
This command shows the available virtual machine sizes in the East US region. It helps you pick the right machine type near your users.
Terminal
az vm list-skus --location eastus --size Standard_DS1_v2 --output table
Expected OutputExpected
Name Tier Size Family ---------------- ------ ------------- -------- Standard_DS1_v2 Standard Standard_DS1_v2 DSv2-Series
→
--location - Specifies the region to check
→
--size - Filters by VM size
→
--output table - Shows output in table format
This command creates an availability set in East US to spread virtual machines across fault and update domains. It helps keep your app running during hardware or software updates.
Terminal
az vm availability-set create --name myAvailabilitySet --resource-group myResourceGroup --location eastus --platform-fault-domain-count 2 --platform-update-domain-count 5
Expected OutputExpected
{ "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet", "location": "eastus", "name": "myAvailabilitySet", "platformFaultDomainCount": 2, "platformUpdateDomainCount": 5, "provisioningState": "Succeeded", "resourceGroup": "myResourceGroup", "type": "Microsoft.Compute/availabilitySets" }
→
--platform-fault-domain-count - Number of fault domains to spread VMs across
→
--platform-update-domain-count - Number of update domains to spread VMs across
This command creates a virtual machine in the East US region inside the availability set. It ensures the VM benefits from high availability.
Terminal
az vm create --resource-group myResourceGroup --name myVM1 --image UbuntuLTS --availability-set myAvailabilitySet --location eastus --admin-username azureuser --generate-ssh-keys
Expected OutputExpected
{ "fqdns": "", "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1", "location": "eastus", "name": "myVM1", "powerState": "VM running", "resourceGroup": "myResourceGroup", "zones": null }
→
--availability-set - Assigns the VM to the availability set
→
--generate-ssh-keys - Creates SSH keys for secure login
This command lists all virtual machines in the resource group to verify the VM creation and its availability set assignment.
Terminal
az vm list --resource-group myResourceGroup --output table
Expected OutputExpected
Name ResourceGroup Location PowerState Zones ------ --------------- ---------- ------------ ----- myVM1 myResourceGroup eastus VM running
→
--output table - Shows output in a readable table
Key Concept

If you remember nothing else from this pattern, remember: Azure regions are physical locations worldwide, and availability zones or sets help keep your apps running by spreading resources across separate hardware.

Common Mistakes
Trying to create resources in a region that does not support the chosen service or VM size.
Azure will return an error because the resource is not available in that region.
Use 'az account list-locations' and 'az vm list-skus' to check availability before creating resources.
Not assigning VMs to an availability set or zone when high availability is needed.
VMs may be placed on the same hardware, causing downtime if that hardware fails.
Create and assign VMs to availability sets or zones to spread risk.
Summary
Use 'az account list-locations' to find Azure regions worldwide.
Create availability sets to spread VMs across fault and update domains for reliability.
Assign VMs to availability sets during creation to ensure high availability.
Verify VM creation and placement with 'az vm list'.

Practice

(1/5)
1. What is an Azure region?
easy
A. A large area with multiple data centers
B. A single data center in one city
C. A network of virtual machines
D. A type of Azure subscription

Solution

  1. Step 1: Understand Azure region concept

    An Azure region is a big area that contains multiple data centers close to each other.
  2. Step 2: Differentiate from other options

    It is not just one data center or a network of virtual machines, but a physical location grouping data centers.
  3. Final Answer:

    A large area with multiple data centers -> Option A
  4. Quick Check:

    Azure region = big area with data centers [OK]
Hint: Regions group many data centers in one area [OK]
Common Mistakes:
  • Thinking a region is a single data center
  • Confusing regions with virtual networks
  • Assuming regions are subscription types
2. Which of the following correctly describes an Availability Zone in Azure?
easy
A. A virtual network inside a region
B. A backup subscription for Azure services
C. A physically separate location within a region
D. A type of Azure storage account

Solution

  1. Step 1: Define Availability Zone

    An Availability Zone is a physically separate location inside an Azure region designed to keep services running during failures.
  2. Step 2: Eliminate incorrect options

    It is not a subscription, virtual network, or storage account type.
  3. Final Answer:

    A physically separate location within a region -> Option C
  4. Quick Check:

    Availability Zone = separate place in region [OK]
Hint: Zones are separate places inside regions [OK]
Common Mistakes:
  • Confusing zones with subscriptions
  • Thinking zones are virtual networks
  • Mixing zones with storage types
3. You deploy an app in the East US region using two Availability Zones. What is the main benefit of this setup?
medium
A. Faster internet speed worldwide
B. Higher app availability during zone failures
C. Lower Azure subscription cost
D. Automatic data backup to another region

Solution

  1. Step 1: Understand multi-zone deployment

    Deploying across two Availability Zones means the app runs in separate physical locations inside the same region.
  2. Step 2: Identify benefit of zones

    This setup helps keep the app running if one zone fails, improving availability.
  3. Final Answer:

    Higher app availability during zone failures -> Option B
  4. Quick Check:

    Zones improve availability by isolation [OK]
Hint: Zones protect apps from local failures [OK]
Common Mistakes:
  • Assuming zones improve global internet speed
  • Thinking zones reduce subscription cost
  • Confusing zones with cross-region backups
4. You tried to deploy a VM in an Azure region but got an error saying the Availability Zone is invalid. What could be the problem?
medium
A. The region does not support Availability Zones
B. The VM size is too small
C. You used the wrong subscription ID
D. The VM OS is unsupported

Solution

  1. Step 1: Check region zone support

    Not all Azure regions have Availability Zones available.
  2. Step 2: Understand error cause

    If you specify a zone in a region that does not support zones, deployment fails with an invalid zone error.
  3. Final Answer:

    The region does not support Availability Zones -> Option A
  4. Quick Check:

    Invalid zone error = region lacks zones [OK]
Hint: Not all regions have zones enabled [OK]
Common Mistakes:
  • Blaming VM size for zone errors
  • Confusing subscription ID with zone issues
  • Assuming OS causes zone errors
5. You want to design a highly available web app in Azure that stays online even if an entire data center fails. Which setup should you choose?
hard
A. Deploy the app in one region with no zones
B. Deploy the app in multiple regions without zones
C. Deploy the app in one Availability Zone only
D. Deploy the app in one region using multiple Availability Zones

Solution

  1. Step 1: Understand data center failure impact

    Availability Zones are physically separate data centers inside a region.
  2. Step 2: Choose setup for high availability

    Deploying across multiple zones in one region protects the app if one data center fails, keeping it online.
  3. Step 3: Compare other options

    Multiple regions help but add complexity; single zone or no zones risk downtime if that data center fails.
  4. Final Answer:

    Deploy the app in one region using multiple Availability Zones -> Option D
  5. Quick Check:

    Zones = data center fault tolerance [OK]
Hint: Use multiple zones in one region for data center failure [OK]
Common Mistakes:
  • Ignoring zones and risking single data center failure
  • Choosing multiple regions without zones for simple HA
  • Assuming one zone is enough for high availability
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard