As the only step in this deployment I am creating a VM from an Image Template.
Error details
DeploymentCanceledByTimeout
The timeout for the deployment was reached, and the deployment was canceled.
These times are very consistent over multiple tests.
- 0:40 the resources group has been created and is visible in the portal
- 1:15 VM is visible in the portal and it's state is Creating
- 11:15 timeout occurs in devportal
- 11:45 VM is Running
location: eastus2
osDiskType: Premium_LRS
virtualMachineSize: Standard_B4ms
OS: Win11
Is this a per object timeout or a timeout for creating the environment?
How do I increase this timeout?
Where is there documentation about this timeout?
Is there a way to execute the ARM templates asynchronously?
The timeout could be caused by a per-object timeout or a timeout during the environment creation process.
Below are the few workarounds I found for your issue.
You can use a custom deployment script with
"timeout": "PT30M"flag in ARM as detailed in this MSDoc. This parameter's value should be greater than the time it takes to create the environment. Or you can also add thedeploymentTimeoutInSecondsparameter to the deployment template directly if it permits.As I mentioned in the comments, it is not possible to execute the ARM templates asynchronously. These are built in synchronous, and the deployment process will move to the next resource only if the prior resource deployment has completed.
But in order to achieve it temporarily, you can use
--no waitargument while deploying the template withaz deployment group createcommand.I tried to deploy a VM windows image using Arm template by referring to github template and the deployment was successful as shown.