• Hands-On Labs
    • Hands-on Lab Exercises
      • Free Azure Lab Project
      • Azure Skillbuilder Collection
      • Azure Administrator Lab Series
      • Active Directory Skillbuilder
      • Microsoft Entra ID Skillbuilder
    • Hands-on Lab Projects
      • Hands-On Azure Labs: Building Redundant Cloud Solutions​
      • Hands-On Azure Labs: Deploy and Configure Azure Monitor
      • Microsoft Applied Skills Lab: Secure Storage for Azure Files and Azure Blob Storage
      • Microsoft Foundry Hands-On Labs: Build an AI Knowledge Assistant
  • Courses
    • Interactive Learning
      • AZ-900 Interactive Course
    • Microsoft Azure
      • AZ-900 Bootcamp: Microsoft Azure Fundamentals
      • AZ-104 Exam Prep: Microsoft Azure Administrator
    • Microsoft 365
      • MS-900 Exam Prep: Microsoft 365 Fundamentals
      • MS-102 Bootcamp: Microsoft 365 Administrator
  • About
  • Pricing
  • For Instructors
  • Login
  • Hands-On Labs
    • Hands-on Lab Exercises
      • Free Azure Lab Project
      • Azure Skillbuilder Collection
      • Azure Administrator Lab Series
      • Active Directory Skillbuilder
      • Microsoft Entra ID Skillbuilder
    • Hands-on Lab Projects
      • Hands-On Azure Labs: Building Redundant Cloud Solutions​
      • Hands-On Azure Labs: Deploy and Configure Azure Monitor
      • Microsoft Applied Skills Lab: Secure Storage for Azure Files and Azure Blob Storage
      • Microsoft Foundry Hands-On Labs: Build an AI Knowledge Assistant
  • Courses
    • Interactive Learning
      • AZ-900 Interactive Course
    • Microsoft Azure
      • AZ-900 Bootcamp: Microsoft Azure Fundamentals
      • AZ-104 Exam Prep: Microsoft Azure Administrator
    • Microsoft 365
      • MS-900 Exam Prep: Microsoft 365 Fundamentals
      • MS-102 Bootcamp: Microsoft 365 Administrator
  • About
  • Pricing
  • For Instructors
  • Login
  • Hands-On Labs
    • Hands-on Lab Exercises
      • Free Azure Lab Project
      • Azure Skillbuilder Collection
      • Azure Administrator Lab Series
      • Active Directory Skillbuilder
      • Microsoft Entra ID Skillbuilder
    • Hands-on Lab Projects
      • Hands-On Azure Labs: Building Redundant Cloud Solutions​
      • Hands-On Azure Labs: Deploy and Configure Azure Monitor
      • Microsoft Applied Skills Lab: Secure Storage for Azure Files and Azure Blob Storage
      • Microsoft Foundry Hands-On Labs: Build an AI Knowledge Assistant
  • Courses
    • Interactive Learning
      • AZ-900 Interactive Course
    • Microsoft Azure
      • AZ-900 Bootcamp: Microsoft Azure Fundamentals
      • AZ-104 Exam Prep: Microsoft Azure Administrator
    • Microsoft 365
      • MS-900 Exam Prep: Microsoft 365 Fundamentals
      • MS-102 Bootcamp: Microsoft 365 Administrator
  • About
  • Pricing
  • For Instructors
  • Login
  • Hands-On Labs
    • Hands-on Lab Exercises
      • Free Azure Lab Project
      • Azure Skillbuilder Collection
      • Azure Administrator Lab Series
      • Active Directory Skillbuilder
      • Microsoft Entra ID Skillbuilder
    • Hands-on Lab Projects
      • Hands-On Azure Labs: Building Redundant Cloud Solutions​
      • Hands-On Azure Labs: Deploy and Configure Azure Monitor
      • Microsoft Applied Skills Lab: Secure Storage for Azure Files and Azure Blob Storage
      • Microsoft Foundry Hands-On Labs: Build an AI Knowledge Assistant
  • Courses
    • Interactive Learning
      • AZ-900 Interactive Course
    • Microsoft Azure
      • AZ-900 Bootcamp: Microsoft Azure Fundamentals
      • AZ-104 Exam Prep: Microsoft Azure Administrator
    • Microsoft 365
      • MS-900 Exam Prep: Microsoft 365 Fundamentals
      • MS-102 Bootcamp: Microsoft 365 Administrator
  • About
  • Pricing
  • For Instructors
  • Login

Azure Virtual Machines — Exam Prep Cheat Sheet

Key facts for AZ-900/AZ-104: sizes, disks, availability, networking, identity, costs & common commands.

Exam Highlights (Know These!)

  • Sizing families: B (burstable), D (general), E (memory), F (compute), Ls (storage I/O), M (SAP HANA), N (GPU).
  • Disks: Premium SSD v2 / Premium SSD / Standard SSD / Standard HDD; managed disks by default.
  • Availability: Availability Sets (fault/update domains), Availability Zones (physically separate), Scale Sets (autoscale VMs).
  • Networking: NICs, NSGs, VNet/subnets, Public IP, Azure Bastion (no public RDP/SSH), Load Balancer (L4), App Gateway (L7/WAF).
  • Identity: System/User-assigned Managed Identity; use Key Vault for secrets.
  • Images: Marketplace, custom images, Azure Compute Gallery (share/version/replicate).
  • Costs: Pay-as-you-go, Reservations (1/3-yr commit), Spot (evictable); Hybrid Benefit & stop-deallocate.

VM Sizes (Family → Best Fit)

FamilyProfileUse
BBurstableDev/Test, low baseline usage
DBalancedWeb/app servers, general workloads
EMemory-optimizedDB/analytics, in-memory cache
FCompute-optimizedCPU-bound, batch, microservices
LsStorage I/ONoSQL, data stores, high throughput
MVery high RAMSAP HANA
NGPUAI/ML, rendering, visualization
Start with D-series; move to E/F/Ls/N for specialized needs.

Disks & Storage

TypePerfTypical Use
Premium SSD v2High, flexible IOPS/throughputProduction apps with tuning needs
Premium SSDHighMost production workloads
Standard SSDModerateBalanced cost/perf
Standard HDDLowerCold data, backups, cost-sensitive
  • OS disk required; add data disks for app/data.
  • Ephemeral OS: OS on host cache/local SSD (fast, stateless).
  • Disk caching: ReadOnly vs ReadWrite (useful for OS/DB patterns).
  • Encryption at rest enabled by default; can use customer-managed keys.

Availability & Scale

  • Availability Set: distributes across fault domains & update domains (same datacenter).
  • Availability Zones: place VMs in zone 1/2/3 for datacenter-level fault isolation within region.
  • Scale Set: manage a group of identical VMs with autoscale rules & load balancing.
  • Use Managed Disks for availability features and simpler management.
  • Back up with Azure Backup; replicate images via Azure Compute Gallery.
Zones > Sets for resiliency; scale sets for horizontal scale.

Networking Essentials

  • Each VM has one or more NICs attached to a subnet in a VNet.
  • NSGs filter traffic at NIC/subnet; default deny inbound.
  • Public IP optional; prefer Azure Bastion for RDP/SSH without exposing VM.
  • Azure Load Balancer (L4) distributes TCP/UDP; App Gateway (L7) does HTTP(S)/WAF.
  • Private connectivity: Private Link to PaaS; VPN/ExpressRoute for hybrid.

Identity & Security

  • Managed Identity (system/user-assigned) to access Azure resources without secrets.
  • Store secrets/keys in Azure Key Vault; use RBAC for control plane, NSG for data plane.
  • Enable Microsoft Defender for Cloud recommendations & just-in-time VM access.
  • Patch via Update Manager; use Extensions for agents/config.

Images & Deployment

  • Sources: Marketplace, custom image (managed image), or Azure Compute Gallery (version/share).
  • Gen2 images support modern features (UEFI, larger disks, vTPM).
  • Use ARM/Bicep/Terraform for repeatable deployments.
  • Boot diagnostics for console screenshots/serial logs.

Cost Controls

  • Pricing: Pay-as-you-go; Reservations (1/3-yr); Spot (evictable).
  • Azure Hybrid Benefit: apply existing Windows Server/SQL licenses.
  • Stop (deallocate) to stop compute charges; storage still billed.
  • Right-size VMs; choose disk tier appropriately; use auto-shutdown for dev/test.

Ops & Troubleshooting

  • Capture image when generalized; use run command/serial console for recovery.
  • Common fixes: NSG rules, route conflicts, disk attachment, extension failures.
  • Move across resource groups/subscriptions with constraints (region/image support).

CLI Quick Commands

az group create -n rg-vm -l eastus az vm create -g rg-vm -n vm1 --image Win2022Datacenter --size Standard_D2s_v5 \ --admin-username azureuser --admin-password "P@ssw0rd1234!" --public-ip-sku Standard az vm stop -g rg-vm -n vm1 az vm deallocate -g rg-vm -n vm1 az vm start -g rg-vm -n vm1 az vm run-command invoke -g rg-vm -n vm1 --command-id RunPowerShellScript --scripts "ipconfig"
Remember: deallocate stops compute billing; stopping alone may not.

PowerShell Quick Commands

New-AzResourceGroup -Name 'rg-vm' -Location 'EastUS' New-AzVM -ResourceGroupName 'rg-vm' -Name 'vm1' -Location 'EastUS' ` -Image 'Win2022Datacenter' -Size 'Standard_D2s_v5' ` -Credential (Get-Credential) -PublicIpSku Standard Stop-AzVM -ResourceGroupName 'rg-vm' -Name 'vm1' -Force Set-AzVM -ResourceGroupName 'rg-vm' -Name 'vm1' -Generalized:$true Start-AzVM -ResourceGroupName 'rg-vm' -Name 'vm1'
Use Az modules; run in Cloud Shell or local with Az installed.

Rapid Q&A (Exam Triggers)

  • Need RDP/SSH without public IP? Use Azure Bastion.
  • Need zone-level resiliency? Deploy across Availability Zones.
  • Share custom images? Azure Compute Gallery with versions/replicas.
  • Cut VM cost for steady workloads? Reservations; apply Hybrid Benefit if eligible.
  • Autoscale front-end VMs? VM Scale Set + Load Balancer.
  • App-level routing/WAF? Application Gateway.

Azure Virtual Machines — Quick Reference

Fast lookup for sizes, storage, networking, HA, pricing & CLI.

VM Sizing (Workload Fit)

SeriesProfileUse
BBurstableDev/Test
DGeneralWeb/App
EMemoryDB / Analytics
FComputeBatch / CPU Heavy
LsStorage IONoSQL / Throughput
MHigh RAMSAP HANA
NGPUAI / ML / Rendering
Default starting points: D-series (general), E-series (DB workloads).

Disk Selection

DiskPerfWhen
Standard HDDLowArchive / Rare
Standard SSDMediumGeneral Workloads
Premium SSDHighProduction Apps
Premium SSD v2High+Tunable Perf
Ultra DiskExtremeCritical DB I/O
  • Use multiple data disks + Storage Spaces for higher throughput.
  • Consider host caching (ReadOnly vs RW).

Networking

  • Place VMs in VNets & subnets with NSGs.
  • Use Azure Bastion or JIT instead of public RDP/SSH.
  • Load Balancer (L4) vs App Gateway (L7/WAF).
  • Use Private Endpoints for PaaS access.

Availability / Resilience

  • Availability Sets → host/rack failure protection.
  • Availability Zones → datacenter failure protection.
  • Scale Sets → autoscale by metrics.
  • Use Azure Backup + ASR for DR.

Security

  • Use Managed Identity instead of stored credentials.
  • Store secrets in Key Vault.
  • Patch via Update Manager.
  • Enable Defender for Cloud.

Pricing Models

  • Pay-as-you-go: Flexible
  • Reservations: 1–3 yr commit, lower cost
  • Spot: Very low cost, but can be evicted