Azure / avdaccelerator

AVD Accelerator deployment automation to simplify the setup of AVD (Azure Virtual Desktop) based on best practices
MIT License
324 stars 207 forks source link

Bicep - Stuck on Azure Files Domain Join (CustomScriptExtension) #509

Closed OrionWithrow-OHIT closed 10 months ago

OrionWithrow-OHIT commented 10 months ago

What happened? Provide a clear and concise description of the bug, including deployment details.

I have not modified the core BICEP code, other than to add one section to Add a vWAN Hub Virtual Network Connection to Peer our AVD Virtual Network to the vWAN Hub.

Please provide the correlation id associated with your error or bug.

AzureFilesDomainJoin' (publisher 'Microsoft.Compute' and type 'CustomScriptExtension'). Error message: \"Command execution finished, but failed because it returned a non-zero exit code of: '1'. The command had an error output of: 'C:\Packages\Plugins\Microsoft.Compute.CustomScriptExtension\1.10.15\Downloads\0\Manual-DSC-Storage-Scripts.ps1 : A \r\nparameter cannot be found that matches parameter name 'CreateNewOU

What was the expected outcome?

The Azure Storage for FSLogix should have completed Domain Join successfully. The Management VoVirtual Machinempleted Domain Join, so I don' believe there is a permissions issue.

Relevant log output

{
    "code": "DeploymentFailed",
    "target": "/subscriptions/d818ff67-b117-4403-a75a-8d09e026c33a/providers/Microsoft.Resources/deployments/Storage-FSLogix-20231019T234615Z",
    "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/d818ff67-b117-4403-a75a-8d09e026c33a/resourceGroups/rg-avd-lab-test-use2-service-objects/providers/Microsoft.Resources/deployments/Add-fslogix-Storage-Setup-20231019T235820Z",
        "message": "The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.",
        "details": [
          {
            "code": "DeploymentFailed",
            "target": "/subscriptions/d818ff67-b117-4403-a75a-8d09e026c33a/resourceGroups/rg-avd-lab-test-use2-service-objects/providers/Microsoft.Resources/deployments/Add-fslogix-Storage-Setup-20231019T235820Z",
            "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/d818ff67-b117-4403-a75a-8d09e026c33a/resourceGroups/rg-avd-lab-test-use2-service-objects/providers/Microsoft.Compute/virtualMachines/ZETVDLABMGMTVM/extensions/AzureFilesDomainJoin",
                "message": "The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.",
                "details": [
                  {
                    "code": "VMExtensionProvisioningError",
                    "message": "VM has reported a failure when processing extension 'AzureFilesDomainJoin' (publisher 'Microsoft.Compute' and type 'CustomScriptExtension'). Error message: \"Command execution finished, but failed because it returned a non-zero exit code of: '1'. The command had an error output of: 'C:\\Packages\\Plugins\\Microsoft.Compute.CustomScriptExtension\\1.10.15\\Downloads\\0\\Manual-DSC-Storage-Scripts.ps1 : A \r\nparameter cannot be found that matches parameter name 'CreateNewOU'.\r\n    + CategoryInfo          : InvalidArgument: (:) [Manual-DSC-Storag...' For more information, check the instance view by executing Get-AzVmssVm or Get-AzVm (https://aka.ms/GetAzVm). These commands can be executed using CloudShell (https://aka.ms/CloudShell)\". More information on troubleshooting is available at https://aka.ms/VMExtensionCSEWindowsTroubleshoot. "
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
moisesjgomez commented 10 months ago

@OrionWithrow-OHIT Thanks for reporting this issue. We are investigating it

danycontre commented 10 months ago

@OrionWithrow-OHIT please update your fork/clone with Azure/main, we appllied a bundle of updates on PR: https://github.com/Azure/avdaccelerator/pull/506

The changes included the deprecation of paramter CreateNewOU, the PR description contains the changes that were applied.

This were the PR breaking changes:

  1. Parameter updates: avdApplicationGroupIdentitiesIds (array) replaced with securityPrincipalId (string) avdIdentityDomainName replaced with identityDomainName
  2. Parameters removed: ** applicationGroupIdentityType (code defaults to group type)
  3. FSLogix settings were updated to block user session that uses local/temp profiles, the following registry keys are being pushed: HKLM:\SOFTWARE\FSLogix\Profiles\PreventLoginWithFailure HKLM:\SOFTWARE\FSLogix\Profiles\PreventLoginWithTempProfile
  4. Parameters deprecated: ** CreateNewOU

c: @moisesjgomez