You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machines/linux/image-builder-gallery.md
+47-11Lines changed: 47 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Use Azure Image Builder with an image gallery for Linux VMs (preview)
3
3
description: Create Linux VM images with Azure Image Builder and Shared Image Gallery.
4
4
author: cynthn
5
5
ms.author: cynthn
6
-
ms.date: 04/20/2019
6
+
ms.date: 05/05/2019
7
7
ms.topic: how-to
8
8
ms.service: virtual-machines-linux
9
9
ms.subservice: imaging
@@ -40,15 +40,17 @@ Check your registration.
40
40
41
41
```azurecli-interactive
42
42
az provider show -n Microsoft.VirtualMachineImages | grep registrationState
43
-
43
+
az provider show -n Microsoft.KeyVault | grep registrationState
44
+
az provider show -n Microsoft.Compute | grep registrationState
44
45
az provider show -n Microsoft.Storage | grep registrationState
45
46
```
46
47
47
48
If they do not say registered, run the following:
48
49
49
50
```azurecli-interactive
50
51
az provider register -n Microsoft.VirtualMachineImages
51
-
52
+
az provider register -n Microsoft.Compute
53
+
az provider register -n Microsoft.KeyVault
52
54
az provider register -n Microsoft.Storage
53
55
```
54
56
@@ -85,18 +87,39 @@ Create the resource group.
85
87
az group create -n $sigResourceGroup -l $location
86
88
```
87
89
90
+
## Create a user-assigned identity and set permissions on the resource group
91
+
Image Builder will use the [user-identity](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/qs-configure-cli-windows-vm#user-assigned-managed-identity) provided to inject the image into the Azure Shared Image Gallery (SIG). In this example, you will create an Azure role definition that has the granular actions to perform distributing the image to the SIG. The role definition will then be assigned to the user-identity.
88
92
89
-
Give Azure Image Builder permission to create resources in that resource group. The `--assignee` value is the app registration ID for the Image Builder service.
93
+
```bash
94
+
# create user assigned identity for image builder to access the storage account where the script is located
95
+
idenityName=aibBuiUserId$(date +'%s')
96
+
az identity create -g $sigResourceGroup -n $idenityName
0 commit comments