Skip to content

Commit 4aef4b0

Browse files
authored
Adding troubleshoot info for auth error
1 parent b39dbca commit 4aef4b0

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,38 @@ The file name or location is incorrect, or the location isn't reachable.
173173

174174
Ensure that the file is reachable. Verify that the name and location are correct.
175175

176+
### Authorization error creating disk
177+
178+
The Azure Image Builder build fails with an authorization error that looks like the following:
179+
180+
#### Error
181+
182+
```text
183+
Attempting to deploy created Image template in Azure fails with an 'The client '64667524-efd0-4530-884c-96dd20bae591' with object id '64667524-efd0-4530-884c-96dd20bae591' does not have authorization to perform action 'Microsoft.Compute/disks/write' over scope '/subscriptions/<subscriptionID>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/disks/proxyVmDiskWin_<timestamp>' or the scope is invalid. If access was recently granted, please refresh your credentials.'
184+
```
185+
#### Cause
186+
187+
This error is caused when trying to specify a pre-existing resource group and VNet to the Azure Image Builder service with a Windows source image.
188+
189+
#### Solution
190+
191+
You will need to assign the contributor role to the resource group for the service principal by using the CLI command or portal instructions below.
192+
193+
To implement this solution using CLI, use the following command:
194+
```azurecli-interactive
195+
az role assignment create -g {ResourceGroupName} --assignee {AibrpSpOid} --role Contributor
196+
```
197+
198+
To implement this solution in portal, follow the instructions in this documentation: [Assign Azure roles using the Azure portal - Azure RBAC](https://learn.microsoft.com/azure/role-based-access-control/role-assignments-portal?tabs=current).
199+
200+
For [Step 1: Identify the needed scope](https://learn.microsoft.com/azure/role-based-access-control/role-assignments-portal?tabs=current#step-1-identify-the-needed-scope): The needed scope is your resource group.
201+
202+
For [Step 3: Select the appropriate role](https://learn.microsoft.com/azure/role-based-access-control/role-assignments-portal?tabs=current#step-3-select-the-appropriate-role): The role is Contributor.
203+
204+
For [Step 4: Select who needs access](https://learn.microsoft.com/azure/role-based-access-control/role-assignments-portal?tabs=current#step-4-select-who-needs-access): Select member “Azure Virtual Machine Image Builder”
205+
206+
Then proceed to [Step 6: Assign role](https://learn.microsoft.com/azure/role-based-access-control/role-assignments-portal?tabs=current#step-6-assign-role) to assign the role.
207+
176208
## Troubleshoot build failures
177209

178210
For image build failures, get the error from the `lastrunstatus`, and then review the details in the *customization.log* file.

0 commit comments

Comments
 (0)