Forum Discussion
AVD and Bicep
- Sep 28, 2024Thank you for your support. I solved it.
I had the AVD resources (HostPool. Workspace,...) and the session host in different resource groups. If I create everything in one RG it works.
Please make sure your Bicep script correctly configures the necessary extensions, below the example, please ensure you fully understand before apply:
resource joinAzuredomain 'Microsoft.Compute/virtualMachines/extensions@2024-07-01' = {
name: '${vmPrefix}/joinAzuredomain'
location: location
properties: {
publisher: 'Microsoft.Azure.ActiveDirectory'
type: 'AADLoginForWindows'
typeHandlerVersion: '1.0'
autoUpgradeMinorVersion: true
}
dependsOn: [ vm ]
}
resource dscextension 'Microsoft.Compute/virtualMachines/extensions@2024-07-01' = {
name: '${vmPrefix}/dscextension'
location: location
properties: {
publisher: 'Microsoft.Powershell'
type: 'DSC'
typeHandlerVersion: '2.73'
autoUpgradeMinorVersion: true
settings: {
modulesUrl: 'https://wvdportalstorageblob.blob.core.windows.net/galleryartifacts/Configuration_1.0.02627.270.zip'
configurationFunction: 'Configuration.ps1\\AddSessionHost'
properties: {
HostPoolName: hostPoolName
registrationInfoToken: HostPoolToken
aadJoin: AADJoin
}
}
}
dependsOn: [ joinAzuredomain ]
}
- jlou65535Sep 27, 2024MCT
Encountering errors during Azure Virtual Desktop deployment?
An issue may arise in the DSC phase due to the setup of AADLoginForWindows or Microsoft.PowerShell.DSC extensions. The problem stems from new subnet configurations defaulting to private subnets.
To ensure smooth operation, your AVD virtual machines must have a subnet allowing outbound traffic.
- StefanKiSep 28, 2024Iron ContributorThank you for your support. I solved it.
I had the AVD resources (HostPool. Workspace,...) and the session host in different resource groups. If I create everything in one RG it works.- AMK13Apr 09, 2025Copper Contributor
Hi, I am having a similar error where i am not able to register a windows 11 machine in the hostpool. My VM and AVD resources are in same RG. I have also attached an NSG with open ports to the avd subnet and VM. the bicep code always runs without any issues. Thank you