Interview Prep/Azure/Quota, Deployment and IaC Errors

`The resource operation completed with terminal provisioning state 'Failed'` for a VM extension (`VMExtensionProvisioningError`).

IntermediateTroubleshootingQuota, Deployment and IaC Errors
Answer

Likely causes → The Custom Script or other extension's script failed, couldn't download, or the VM agent is unhealthy.

Diagnose →

az vm get-instance-view -g rg -n vm-app --query "instanceView.extensions[].statuses"
# On the VM:
sudo tail -n 100 /var/log/azure/custom-script/handler.log
sudo ls /var/lib/waagent/custom-script/download/0/

Fix → Fix the script (exit codes, network access to the script URL), then redeploy with a new timestamp setting.

Prevent → Prefer cloud-init or baked images; test scripts locally.

Azure All Azure questions

More on Quota, Deployment and IaC Errors