Error validating ARM template. Max retries exceeded with url

Alif Alimi 1 Reputation point
2020-12-03T04:49:55.443+00:00

I want to validate my ARM template with changing the "location", "customData" parameters but I can not do so as i got error below:

[2020-12-03T02:54:47.208Z] + az deployment sub validate --location southeastasia --template-file ARMTemplate/template.json --parameters ARMTemplate/parameters.json

[2020-12-03T02:55:02.083Z] Error occurred in request., RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/****/providers/Microsoft.Resources/deployments/template/validate?api-version=2020-06-01 (Caused by ResponseError('too many 500 error responses',))

script returned exit code 1

Your help is appreciated. thanks.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,906 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 20,047 Reputation points Microsoft Employee
    2020-12-05T02:24:49.427+00:00

    This error message appears in instances when there are some errors in the script and Azure cannot validate the script successfully.

    Here are some useful links about how to create a VM from ARM template:

    How to create a Linux virtual machine with Azure Resource Manager templates:
    https://learn.microsoft.com/en-us/azure/virtual-machines/linux/create-ssh-secured-vm-from-template

    You can find templates in Azure quickstart templates repository:
    https://github.com/Azure/azure-quickstart-templates

    You can start from this one and make updates as needed:
    https://github.com/Azure/azure-quickstart-templates/tree/master/101-vm-simple-linux

    In addition to the articles already provided above, something that can help you as starting point for your template, is the Azure Portal.

    When you follow the wizard to create a VM, you have all the options to define the requirements.
    Once requirements are defined in the Portal and before you create the VM, you will see the option to “Download a template for automation” in the very last TAB of the CreateVM blade.

    From there, the downloaded template is pretty much ready. You will likely have to apply some minor changes so that the “az deployment sub validate” command will like it. E.g. password must for the admin account must be added; or the location has to be likely removed.

    To debug the ARM template, the following document can help since it explain the template format and what is expected/supported in an ARM template itself:
    https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-syntax

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.