Describe the bug
There is a 20 minute timeout for the domain join extension and if there is a large volume of resources that the Azure Resource Manager is processing, this may prevent the extension from properly installing. See: https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/features-windows#troubleshoot-vm-extensions
To Reproduce
Steps to reproduce the behavior:
These errors are generated when executing the script as such:
. .\Deploy-AzureResourceGroup.ps1
Expected behavior
The domain join operation would complete as expected for all VMs, but in this case, only a few were not able to join the domain.
Screenshots
NA
Desktop (please complete the following information):
- OS: Windows 10
- PowerShell version: 5.1
- PowerShell Host: VSCode 1.42.1
Additional context
New-AzResourceGroupDeployment : 15:41:40 - Resource Microsoft.Compute/virtualMachines/extensions 'AZRADG1202/joindomain' failed with message '{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "VMExtensionProvisioningError",
"message": "VM has reported a failure when processing extension 'joindomain'. Error message: "Join failed for Domain 'dev.adatum.com' with the error: Exception of type 'System.OutOfMemoryException' was thrown."\r\n\r\nMore information on
troubleshooting is available at https://aka.ms/vmextensionwindowstroubleshoot "
}
]
}
}'
At C:\OneDrivePersonal\OneDrive\02.00.00.GENERAL\repos\git\0026-azure-automation-plus-dsc-lab\Deploy-AzureResourceGroup.ps1:288 char:1
- New-AzResourceGroupDeployment -ResourceGroupName $rg `
-
+ CategoryInfo : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
New-AzResourceGroupDeployment : 15:41:40 - VM has reported a failure when processing extension 'joindomain'. Error message: "Join failed for Domain 'dev.adatum.com' with the error: Exception of type 'System.OutOfMemoryException' was thrown."
More information on troubleshooting is available at https://aka.ms/vmextensionwindowstroubleshoot
At C:\OneDrivePersonal\OneDrive\02.00.00.GENERAL\repos\git\0026-azure-automation-plus-dsc-lab\Deploy-AzureResourceGroup.ps1:288 char:1
- New-AzResourceGroupDeployment -ResourceGroupName $rg `
-
+ CategoryInfo : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
VERBOSE: 15:41:41 - Resource Microsoft.Resources/deployments '17.25.00.linkedDeploymentCreateAdsServers' provisioning status is succeeded
VERBOSE: 15:41:41 - Checking deployment status in 8 seconds
VERBOSE: 15:41:57 - Resource Microsoft.Compute/virtualMachines/extensions 'AZRADG1201/joindomain' provisioning status is succeeded
New-AzResourceGroupDeployment : 15:41:57 - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
At C:\OneDrivePersonal\OneDrive\02.00.00.GENERAL\repos\git\0026-azure-automation-plus-dsc-lab\Deploy-AzureResourceGroup.ps1:288 char:1
- New-AzResourceGroupDeployment -ResourceGroupName $rg `
-
+ CategoryInfo : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
New-AzResourceGroupDeployment : 15:41:57 - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
At C:\OneDrivePersonal\OneDrive\02.00.00.GENERAL\repos\git\0026-azure-automation-plus-dsc-lab\Deploy-AzureResourceGroup.ps1:288 char:1
- New-AzResourceGroupDeployment -ResourceGroupName $rg `
-
+ CategoryInfo : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
VERBOSE: 15:41:58 - Checking deployment status in 16 seconds
New-AzResourceGroupDeployment : 15:42:22 - Resource Microsoft.Resources/deployments '17.25.01.linkedDeploymentCreateAdsGuiServers' failed with message '{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "DeploymentFailed",
"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
"details": [
{
"code": "Conflict",
"message": "{\r\n "status": "Failed",\r\n "error": {\r\n "code": "ResourceDeploymentFailure",\r\n "message": "The resource operation completed with terminal provisioning state 'Failed'.",\r\n "details": [\r\n {\r\n
"code": "VMExtensionProvisioningError",\r\n "message": "VM has reported a failure when processing extension 'joindomain'. Error message: \"Join failed for Domain 'dev.adatum.com' with the error: Exception of type
'System.OutOfMemoryException' was thrown.\"\r\n\r\nMore information on troubleshooting is available at https://aka.ms/vmextensionwindowstroubleshoot "\r\n }\r\n ]\r\n }\r\n}"
}
]
}
]
}
}'
At C:\OneDrivePersonal\OneDrive\02.00.00.GENERAL\repos\git\0026-azure-automation-plus-dsc-lab\Deploy-AzureResourceGroup.ps1:288 char:1
- New-AzResourceGroupDeployment -ResourceGroupName $rg `
-
+ CategoryInfo : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
New-AzResourceGroupDeployment : 15:42:22 - At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
At C:\OneDrivePersonal\OneDrive\02.00.00.GENERAL\repos\git\0026-azure-automation-plus-dsc-lab\Deploy-AzureResourceGroup.ps1:288 char:1
- New-AzResourceGroupDeployment -ResourceGroupName $rg `
-
+ CategoryInfo : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
{
"code": "DeploymentFailed",
"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
"details": [
{
"code": "Conflict",
"message": "{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n
\"code\": \"VMExtensionProvisioningError\",\r\n \"message\": \"VM has reported a failure when processing extension 'joindomain'. Error message: \\\"Join failed for Domain 'dev.adatum.com' with the error: Unknown error
\"8\".\"\r\n\r\nMore information on troubleshooting is available at https://aka.ms/vmextensionwindowstroubleshoot "\r\n }\r\n ]\r\n }\r\n}"
}
]
}
]
}
}'
At C:\OneDrivePersonal\OneDrive\02.00.00.GENERAL\repos\git\0026-azure-automation-plus-dsc-lab\Deploy-AzureResourceGroup.ps1:288 char:1
- New-AzResourceGroupDeployment -ResourceGroupName $rg `
-
+ CategoryInfo : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
New-AzResourceGroupDeployment : 15:42:57 - At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
At C:\OneDrivePersonal\OneDrive\02.00.00.GENERAL\repos\git\0026-azure-automation-plus-dsc-lab\Deploy-AzureResourceGroup.ps1:288 char:1
- New-AzResourceGroupDeployment -ResourceGroupName $rg `
-
+ CategoryInfo : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet