The resource operation completed with terminal provisioning state 'Failed'.
Virtual Machine Status: Failed.
A Failed VM provisioning state means the last Azure control-plane operation did not complete. The VM's power state can differ, so check its Activity Log and failed extension or deployment details before choosing a recovery action.
The resource operation completed with terminal provisioning state 'Failed'.
Virtual Machine Status: Failed.
Why it happens
A VM create or update operation failed after Azure Resource Manager accepted it.
A VM extension, guest-agent operation, or image provisioning step failed; inspect the exact error before changing extensions or the image.
The recorded provisioning state may remain Failed after an operation even when the VM's power state says Running.
How to fix it
Check the VM's power state separately from its provisioning state. In the Azure portal Activity Log, open the most recent failed operation and record its detailed error code, time, and correlation ID.
If the failed operation names a VM extension, inspect that extension's status and logs. Fix its specific configuration or guest-agent problem before retrying it.
For a VM stuck in Failed state after a control-plane operation, use Reapply in the VM's Redeploy + reapply menu, or `az vm reapply -g <resource-group> -n <vm-name>`. Microsoft's documented reapply resolution requires API version 2019-07-01 or later.
After reapply, refresh the VM overview and confirm the provisioning state is Succeeded. Retry the originally blocked operation and check the Activity Log for a new failure.
If reapply fails or the detailed error points to image preparation, allocation, or guest provisioning, follow the service-specific error and review Azure Service Health. Plan any redeploy or disk recovery separately because these actions can disrupt the VM.