Skip to content

Commit 88dc8ee

Browse files
Merge pull request #248374 from ericd-mst-github/erd-aib-troubleshoot
updated troubleshoot doc with key vault public access issue
2 parents 3eef6a2 + 6b777aa commit 88dc8ee

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

articles/virtual-machines/linux/image-builder-troubleshoot.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,33 @@ The `customization.log` file includes the following stages:
354354
- Ensure that Azure Policy and Firewall allow connectivity to remote resources.
355355
- Output comments to the console by using `Write-Host` or `echo`. Doing so lets you search the *customization.log* file.
356356
357+
357358
## Troubleshoot common build errors
358359
360+
### The template deployment failed because of policy violation
361+
362+
#### Error
363+
364+
```text
365+
{
366+
"statusCode": "BadRequest",
367+
"serviceRequestId": null,
368+
"statusMessage": "{\"error\":{\"code\":\"InvalidTemplateDeployment\",\"message\":\"The template deployment failed because of policy violation. Please see details for more information.\",\"details\":[{\"code\":\"RequestDisallowedByPolicy\",\"target\":\"<target_name>\",\"message\":\"Resource '<resource_name>' was disallowed by policy. Policy identifiers: '[{\\\"policyAssignment\\\":{\\\"name\\\":\\\"[Initiative] KeyVault (Microsoft.KeyVault)\\\",\\\"id\\\":\\\"/providers/Microsoft.Management/managementGroups/<managementGroup_name>/providers/Microsoft.Authorization/policyAssignments/Microsoft.KeyVault\\\"},\\\"policyDefinition\\\":{\\\"name\\\":\\\"Azure Key Vault should disable public network access\\\",\\\"id\\\":\\\"/providers/Microsoft.Management/managementGroups/<managementGroup_name>/providers/Microsoft.Authorization/policyDefinitions/KeyVault.disablePublicNetworkAccess_deny_deny\\\"},\\\"policySetDefinition\\\":{\\\"name\\\":\\\"[Initiative] KeyVault (Microsoft.KeyVault)\\\",\\\"id\\\":\\\"/providers/Microsoft.Management/managementGroups/<managementGroup_name>/providers/Microsoft.Authorization/policySetDefinitions/Microsoft.KeyVault\\\"}}]'.\",\"additionalInfo\":[{\"type\":\"PolicyViolation\"}]}]}}",
369+
"eventCategory": "Administrative",
370+
"entity": "/subscriptions/<subscription_ID>/<resourcegroups>/<resourcegroupname>/providers/Microsoft.Resources/deployments/<deployment_name>",
371+
"message": "Microsoft.Resources/deployments/validate/action",
372+
"hierarchy": "<subscription_ID>/<resourcegroupname>/<policy_name>/<managementGroup_name>/<deployment_ID>"
373+
}
374+
```
375+
376+
#### Cause
377+
378+
The above policy violation error is a result of using an Azure Key Vault with public access disabled. At this time, Azure Image Builder doesn't support this configuration.
379+
380+
#### Solution
381+
382+
The Azure Key Vault must be created with public access enabled.
383+
359384
### Packer build command failure
360385

361386
#### Error

0 commit comments

Comments
 (0)