Use it when deploying and operating workloads in Azure, choosing between VMs and managed platforms, and troubleshooting VMs that will not start or cannot be reached.
Azure Compute
Azure Compute covers IaaS virtual machines and scale sets and the PaaS and serverless platforms (App Service, Functions, Container Apps, AKS) that run code without you managing VMs.
1. Is the VM running and provisioning succeeded?
2. Is the VM agent ready (needed for extensions and run command)?
3. What does the boot log/serial console show?
4. Is the instance in a zone or availability set, and are there at least two?
image + size + disks + NIC → VM in zone/availability set → VM agent and extensions → guest OS → application; PaaS: plan → app instances → deployment slots
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
az functionapp list --query "[].{name:name, state:state}" --output tableVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Read-only Verification Verify boundary
# VMs with power state and IPs
az vm list -d --query "[].{name:name, rg:resourceGroup, state:powerState, private:privateIps, zone:zones[0]}" --output table
# Detailed status of one VM: provisioning, power, agent, extensions
az vm get-instance-view --resource-group rg-app --name vm-app01 \
--query "{statuses:instanceView.statuses[].displayStatus, agent:instanceView.vmAgent.statuses[0].displayStatus}"
# Boot log (serial output)
az vm boot-diagnostics get-boot-log --resource-group rg-app --name vm-app01 | tail -40
# PaaS
az webapp list --query "[].{name:name, state:state, plan:appServicePlanId}" --output table
az functionapp list --query "[].{name:name, state:state}" --output table
VM running with agent Not Ready usually means the guest booted but the agent cannot reach Azure (guest firewall, DNS or a broken agent) — run command and extensions will not work until it is fixed.
Step 2 Common mistakes Narrow the fault
Step 3 Troubleshooting Narrow the fault
Cannot SSH/RDP. Check NSG rules (subnet and NIC), effective routes, public IP or Bastion, then the guest firewall — use serial console or run command to look inside.
VM will not start: allocation failure. Size not available in that zone/cluster at the moment; try another size, zone, or deallocate and retry.
VM boots to emergency mode. Bad /etc/fstab entry or disk change — fix through the serial console.
Costs continue after "stopping" VMs. They were stopped inside the OS, not deallocated.
App Service 503 after deployment. App failed to start; check log stream and the deployment slot before swapping.
A stopped VM still costs money until it is deallocated. Use availability zones (or availability sets) and at least two instances for HA. When a VM is unreachable, use boot diagnostics, serial console and run command instead of guessing. App Service and Functions scale through their plan.
az vm list -d -o table— VMs with power state and IPs.az vm get-instance-view -g <rg> -n <vm>— power state, provisioning, agent and extension status.az vm boot-diagnostics get-boot-log -g <rg> -n <vm>— serial log.az webapp show -g <rg> -n <app> --query state/az functionapp list -o table.
ReferenceWhat it is2 sections · depth on demand
Direct Answer
Azure offers compute at several levels. Virtual Machines (IaaS) give full OS control; VM Scale Sets run many identical VMs with autoscaling. App Service hosts web apps and APIs on a managed platform, Azure Functions runs event-driven code (serverless), Azure Container Apps runs containers serverlessly, and AKS is managed Kubernetes. For resilience, spread instances across availability zones. For VM problems, Azure gives you tools that work even when the network does not: boot diagnostics, the serial console and run command.
Scope and canonical references
- Platform basics: Microsoft Azure; models: Cloud Service Models.
- Networking for VMs: Azure Networking.
- Disks: Azure Storage.
- HA design: Cloud Architecture and High Availability.
- Kubernetes and containers: Containers Domain; hypervisor concepts: Virtualization Domain.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Virtual machines
| Element | Notes |
|---|---|
| Size | Family + vCPU/memory (e.g. general purpose D-series, memory E-series, compute F-series, GPU N-series); availability differs per region/zone |
| Image | Marketplace, custom, Azure Compute Gallery |
| OS disk / data disks | Managed disks (Standard HDD/SSD, Premium SSD, Premium SSD v2, Ultra); temporary disk is lost on redeploy/deallocate |
| NIC | In a subnet; NSG on NIC and/or subnet |
| VM agent | Required for extensions, run command, password reset |
| Availability | Single zone (zonal), across zones, or availability set (fault/update domains in one datacenter) |
Power states and billing
| State | Billed for compute? |
|---|---|
| Running | Yes |
| Stopped (from inside the OS) | Yes — resources still allocated |
| Stopped (deallocated) | No (disks and public IPs still billed) |
Scale sets
VM Scale Sets manage identical instances with autoscale rules (CPU, queue length, schedule) and can spread instances across zones. Flexible orchestration is the current default and mixes well with standard VM features.
PaaS and serverless
| Service | Scaling unit | Notes |
|---|---|---|
| App Service | App Service plan (instances) | Deployment slots for zero-downtime swaps; VNet integration for private outbound access |
| Azure Functions | Consumption/Flex Consumption (event-driven) or Premium/dedicated plans | Triggers and bindings; execution time limits depend on the plan |
| Container Apps | Replicas, scale rules (KEDA), scale to zero | Serverless containers with revisions |
| AKS | Node pools (VMSS) + pods | You manage workloads and node pool upgrades; Azure manages the control plane |
Operating VMs without network access
- Boot diagnostics — screenshot and serial log of boot.
- Serial console — interactive text console to the guest (needs boot diagnostics and a local password or credentials).
- Run command — runs a script inside the VM through the agent.
- Redeploy — moves the VM to another host (temporary disk lost).
- Reset password / reset SSH — through the VM access extension.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Deep reference
Healthy vs suspicious evidence
Output interpretation
az vm list -d: powerState values VM running, VM stopped (still allocated and billed for compute) and VM deallocated (compute released). VM stopped on a server you thought was saving money is a cost finding.
Instance view: ProvisioningState/succeeded plus PowerState/running is healthy; ProvisioningState/failed after an extension or resize points at that operation. VM agent Not Ready while the VM runs means extensions and run-command will not work until the guest agent can reach Azure.
Boot diagnostics log: the serial console output shows whether the OS booted, is stuck at a filesystem check, or failed to find its disk.
Design & tradeoffs
Design decisions
VM vs scale set vs PaaS: single VMs suit legacy or stateful servers; Virtual Machine Scale Sets for identical, horizontally scaled instances; App Service or Functions when the application fits the platform.
Availability: spread instances across availability zones; a single VM gets a lower SLA than zonal pairs.
Sizing: start from measured CPU/memory/IO, prefer newer VM generations, and use reservations or savings plans only for steady baseline capacity.
Images and patching: use maintained images and an update-management process; immutable rebuilds are easier to reason about than long-lived snowflake VMs.