Sep 25 2024 03:58 PM - edited Sep 25 2024 04:04 PM
Hello,
I’m trying to deploy AVD as ADD joined using bicep but it failed. The session host is created but not correctly assigned to the host pool. There is always an error with the DomainTrustCheck and DomainJoinedCheck
My code:
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
]
}
I follow steps found on the following links to make most of my deployment.
Ref : https://rozemuller.com/avd-automation-cocktail-avd-with-bicep-and-azure-cli/
Ref: https://tighetec.co.uk/2021/07/07/deploy-azure-virtual-desktop-with-project-bicep/
Sep 25 2024 05:31 PM
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 ]
}
Sep 27 2024 05:10 AM - edited Sep 27 2024 05:11 AM
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.
Sep 28 2024 12:50 PM
SolutionSep 28 2024 12:50 PM
Solution