Azure: Deployment never ends / Internal Server Error

When a deployment never ends, you may start looking for answers. Burred deep in deployment you may come across one of the most helpful errors to date:

  "error": {
    "code": "InternalServerError",
    "message": "Encountered internal server error. Diagnostic information: timestamp '20170628T131823Z', subscription id '38c8bf69-6c5c-43f7-812b-37a0d11bd6b3', tracking id '021f36a9-ce31-41ad-870f-751255aa0972', request correlation id '771994f5-142a-4b6a-8fe5-1f678eedc1df'."

To find this error,

  1. In Azure portal, go to Resource groups > {ResourceGroupName} > Deployments.
  2. Click the name of the deployment that is in progress (Status: Deploying).
  3. Scroll right to the bottom of the “Deployment” blade.
  4. Under “Operation details” look for the resource and check its status.
  5. Click on the one with an issue to see the full “STATUSMESSAGE” text.

At this point, it doesn’t give you much of an idea of what the problem is, but at least you now know the resource that has issues.

In this case, I was trying to create managed disks, where I defined the resource twice. Once to create a single data disk of 128GB and another in a copy loop with a count of X, of 512GB in size. It didn’t like the same resource being used twice. IMHO, MS need to handle this sort of error.

Under the VM resource:

"dataDisks": [
              "name": "[concat(variables('vmName'),'-datadisk1a')]",
              "diskSizeGB": "128",
              "lun": 0,
              "createOption": "Empty",
              "managedDisk": {
                "storageAccountType": "[parameters('sharedVariables').storageAccountType]"
          "copy": [
              "name": "DataDisks",
              "count": "[parameters('sharedVariables').dbDisk.Quantity]",
              "input": {
                "name": "[concat(variables('vmName'),'-datadisk',add(copyIndex('DataDisks'),1))]",
                "diskSizeGB": "[variables('dbDiskIndividualSize')]",
                "lun": "[add(copyIndex('DataDisks'),1)]",
                "createOption": "Empty",
                "managedDisk": {
                  "storageAccountType": "[parameters('sharedVariables').storageAccountType]"

Once I removed lines 1-11, the deployment succeeded.

To achieve this, it looks like I will have to is use a top-level managed disk resource, outside of the VM resource.



Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see

This site uses Akismet to reduce spam. Learn how your comment data is processed.