Unable to create a VM in session host for AVD setup

sathish kumar 0 Reputation points
2026-07-03T02:07:03.2166667+00:00

{

"code": "DeploymentFailed",

"target": "/subscriptions/eb56d04d-ab6b-4466-b494-c6cbab2fd740/resourceGroups/AzureRG/providers/Microsoft.Resources/deployments/AddVMsToHostPool-3e9e7198-7409-4348-9bef-a8ef771480c0-deployment",

"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.",

"details": [

{

  "code": "ResourceDeploymentFailure",

  "target": "/subscriptions/eb56d04d-ab6b-4466-b494-c6cbab2fd740/resourceGroups/AzureRG/providers/Microsoft.Resources/deployments/vmCreation-linkedTemplate-3e9e7198-7409-4348-9bef-a8ef771480c0",

  "message": "The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'."

}

]

}

Azure Virtual Desktop
Azure Virtual Desktop

A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.

0 comments No comments

1 answer

Sort by: Newest
  1. AI answer

    2026-07-03T02:07:19.92+00:00

    The error shows a generic DeploymentFailed / ResourceDeploymentFailure during the linked template vmCreation-linkedTemplate-... for adding VMs to an Azure Virtual Desktop (AVD) host pool. To identify and fix the root cause, the deployment and activity logs must be checked, then the specific error resolved.

    Follow these steps:

    1. Inspect the failed deployment operations
      1. In the Azure portal, go to Resource groups → select AzureRG.
      2. Select Deployments → open the failed deployment AddVMsToHostPool-3e9e7...-deployment.
      3. Select Operation details for the failed operation vmCreation-linkedTemplate-3e9e7....
      4. Note the inner error code and message (for example: VmSkuNotAvailableInRegion, InvalidResourceReference, VMExtensionProvisioningError, domain join errors, etc.). This inner error determines the fix.
    2. If the error is about VM SKU / region / quota (for example VmSkuNotAvailableInRegion, VmSkuNotAvailableInRegionDueToRestriction, AvailabilityZoneNotAvailable):
      1. Verify that the selected VM size, region, and availability zone are supported and that subscription quota is sufficient.
      2. Use Get-AzComputeResourceSku to check restrictions for the chosen VM SKU and region.
      3. Adjust the session host configuration (VM size, region, availability zone) to a supported combination and redeploy.
    3. If the error is about parameter compatibility (for example ComputeSkuIncompatibleWithImageHyperVGeneration, ImageDiskTypeIncompatible, VnetLocationIncompatible):
      1. Confirm that the VM SKU, OS image, disk type, and virtual network location meet Azure Virtual Desktop prerequisites.
      2. Correct any incompatible combination (for example, align VNet region with VM location, choose a compatible image/disk type) and redeploy.
    4. If the error is an ARM template–specific deployment error (for example InvalidResourceReference, VMExtensionProvisioningError, domain join or DSC errors):
      1. In the failed deployment’s Operation details, capture the exact error text.
      2. Use the guidance in Troubleshoot host pool creation:
        • InvalidResourceReference due to name collision (NIC or other resource): change the host name prefix so that NIC and related resource names are unique, then redeploy.
        • VMExtensionProvisioningError or DSC errors: verify that the admin username/password used in the template have local admin rights on the VM, then rerun the deployment.
        • Domain join failures (.../joindomain):
          • Check that domain join credentials are correct.
          • Ensure the domain name resolves from the VNet.
          • Ensure the VNet DNS settings are set to Custom and point to the domain controller/DNS server, not the default Azure DNS.
    5. If the session host configuration itself failed to create
      • If the host pool’s session host configuration failed during creation (for example due to invalid VM SKU/region/image/network combination), the portal may not allow creating a new configuration for that host pool.
      • Options:
        1. Create the session host configuration via PowerShell using New-AzWvdSessionHostConfiguration with corrected parameters, then redeploy session hosts.
        2. Or delete the problematic host pool and recreate it with valid session host configuration parameters.
    6. If no clear error appears in the deployment blade
      1. In the Azure portal, go to MonitorActivity log.
      2. Filter by resource group AzureRG and the time of the failed deployment.
      3. Open the error entry and use the detailed error message and code together with the ARM troubleshooting guidance to resolve the issue.
      4. After fixing the root cause, delete any partially created resources from the failed deployment and rerun the deployment.

    Once the underlying cause (SKU/region/quota, parameter incompatibility, domain join, NIC name collision, DSC/extension failure, etc.) is corrected, rerun the AddVMsToHostPool-... deployment or re-add VMs to the host pool.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

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