Azure Local VM images fail to deploy.

Warman, Alan 40 Reputation points
2025-05-06T18:27:55.0766667+00:00

I got into the resources pane and now I can't set up new VM images. I have tried both local shares and storage blobs, but it fails to deploy due to timeout every time. the Raw error is:

{
  "code": "InternalError",
  "message": "Internal error occurred: rpc error: code = DeadlineExceeded desc = context deadline exceeded"
}

CleanShot 2025-05-06 at 14.18.05

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

Accepted answer
  1. Anusree Nashetty 4,385 Reputation points Microsoft External Staff Moderator
    2025-05-06T22:05:43.18+00:00

    Hello Warman, Alan,

    Based on the error message "rpc error: code = DeadlineExceeded desc = context deadline exceeded," it seems like the deployment is timing out, which can happen for several reasons.

    Please check these:
    Delete any partially created image versions or resource locks. Clear or recreate the local gallery or image definitions if needed.
    In the Azure portal: Go to Monitor > Activity log. Filter by the failed deployment time and operation name: Create Image Version or similar.
    Confirm that the identity used for deployment has the necessary permissions to access both the storage account and the Azure Compute Gallery.
    Ensure your subscription/resource group has enough quota/resources available.

    Please check this document: The resource operation finished with a terminal provisioning state of "Failed", Time-out exceeded

    If you have any further queries, let me know. If the information is helpful, please click on Upvote.

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Rebecca Oburotha 0 Reputation points
    2025-05-07T20:54:18.75+00:00

    Hi @Warman, Alan ,

    Thank your for providing feedback.

    You initially had trouble deploying VM images in Azure due to a timeout error. You resolved this by uploading an image successfully.

    Now, you're facing a session host deployment failure.

    Possible causes include:

    -Domain join issues (incorrect credentials or network access problems).

    -DNS misconfiguration, preventing hostname resolution.

    -Network connectivity problems, blocking access to necessary files.

    -Insufficient permissions for joining Azure Virtual Desktop.

    -Transient deployment failures that might resolve with a retry.

    You can check Azure's activity logs and try redeploying while verifying network settings and permissions. Here’s a troubleshooting guide that might help https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-desktop/troubleshoot-vm-configuration

    If this fixes the additional issue, please mark as resolved to help others with find it.

    Happy to help

    Rebecca

    0 comments No comments

  2. poonam thakur 0 Reputation points
    2025-05-27T16:25:51.7566667+00:00

    Hi there! I understand you're facing this error when trying to deploy a new VM image:

    nginx
    Copy
    Internal error occurred: rpc error: code = DeadlineExceeded desc = context deadline exceeded
    

    This means Azure tried to complete your request, but something took too long — likely when accessing your image source (like a blob or local share).

    Let's fix this step-by-step. 👇


    Check the Image Source

    If you’re using a VHD from blob storage, please double-check the following:

    The VHD must be a page blob, not a block blob.

    The VHD file should end in .vhd and be in Azure-supported format.

    The storage account must be in the same region as your VM deployment.

    You can check your blob with this Azure CLI command:

    bash
    Copy
    az storage blob show \
      --account-name <your-storage-account> \
      --container-name <your-container> \
      --name <your-vhd-file.vhd>
    

    Test Blob Access Speed

    Try to download or access the VHD URL (with SAS token) in a browser or using this command:

    bash
    Copy
    curl -I "<your-blob-url-with-sas>"
    

    If it hangs or responds very slowly, Azure may also be timing out on it.


    Convert to Managed Image (Recommended)

    Instead of deploying directly from a VHD, upload the VHD to Azure and create a managed image from it.

    bash
    Copy
    az image create \
      --name myManagedImage \
      --resource-group myResourceGroup \
      --os-type Linux \
      --source "https://<storage-account>.blob.core.windows.net/<container>/<image>.vhd?<sas-token>"
    

    Then use this image to create the VM:

    bash
    Copy
    az vm create \
      --name myVM \
      --resource-group myResourceGroup \
      --image myManagedImage \
      --admin-username azureuser \
      --generate-ssh-keys
    
    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.