highIntermediateUSE#vm#managed-disk#attach#disk#storage

Managed disk stuck in Attaching state

az vm show disk state shows Attaching for more than 5 minutes

Likely source:availabilitydata-loss

Focused incident mode — strips away everything but this runbook.

Symptoms

  • az vm show disk state shows Attaching for more than 5 minutes
  • VM cannot be stopped or deallocated because of the stuck disk
  • az disk show ProvisioningState stuck at Updating

Evidence to grab

Collect these artifacts before you change anything — they prove (or rule out) each cause.

  • Disk provisioning state

    az disk show --ids <DISK-ID> --query "{state:provisioningState}" -o json
  • VM disk listing

    az vm show -g <RG> -n <VM-NAME> --query storageProfile.dataDisks -o json

Diagnostic flow

Run the steps in order, marking each claim confirmed or refuted. The evidence you gather feeds the ranked causes below.

Guided decision tree is ready.

Steps with commands, expected output, and pass/fail branches.

Ranked root causes

Evidence checklist

  • Multiple disks attached in parallel via template or script
  • Disk provisioningState stuck at Updating for 10+ minutes

Confirm before fixing

az disk show --ids <DISK-ID> --query provisioningState -o tsv
READ

Confirm the stuck state

Fix

az disk update --ids <DISK-ID> --set provisioningState=Available
CHANGE

Attempt to reset the provisioning state (platform-side fix may be needed)

Resolution runbook

Apply from top to bottom after the cause is confirmed. Review every command before running it — risk tags are shown on each.

1
az disk show --ids <DISK-ID> --query "{state:provisioningState,sku:sku.name}" -o table
READ

Confirm disk state

2
az vm get-instance-view -g <RG> -n <VM-NAME> --query provisioningState -o tsv
READ

Check for pending platform operations

3
az vm restart -g <RG> -n <VM-NAME>
CHANGE

Restart VM to complete disk attach

Prevention

  • Attach disks sequentially, not in parallel, using Bicep or Terraform with depends_on.
  • Validate disk and VM are in the same zone before attach.
  • Use Premium SSD or Ultra Disk for critical workloads to reduce platform delays.
  • Set up alerts on disk provisioningState != Succeeded.

Commands marked READ CHANGE DESTRUCTIVE — never run DESTRUCTIVE commands against production data you cannot restore. Copy → verify → execute.