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-update-image-version.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Create a new VM image version from an existing image version using Azure
3
3
description: Create a new VM image version from an existing image version using Azure Image Builder.
4
4
author: cynthn
5
5
ms.author: cynthn
6
-
ms.date: 05/02/2019
6
+
ms.date: 05/05/2020
7
7
ms.topic: how-to
8
8
ms.service: virtual-machines-linux
9
9
ms.subservice: imaging
@@ -33,15 +33,17 @@ Check your registration.
33
33
34
34
```azurecli-interactive
35
35
az provider show -n Microsoft.VirtualMachineImages | grep registrationState
36
-
36
+
az provider show -n Microsoft.KeyVault | grep registrationState
37
+
az provider show -n Microsoft.Compute | grep registrationState
37
38
az provider show -n Microsoft.Storage | grep registrationState
38
39
```
39
40
40
41
If they do not say registered, run the following:
41
42
42
43
```azurecli-interactive
43
44
az provider register -n Microsoft.VirtualMachineImages
44
-
45
+
az provider register -n Microsoft.Compute
46
+
az provider register -n Microsoft.KeyVault
45
47
az provider register -n Microsoft.Storage
46
48
```
47
49
@@ -50,8 +52,6 @@ az provider register -n Microsoft.Storage
50
52
51
53
If you used [Create an image and distribute to a Shared Image Gallery](image-builder-gallery.md) to create your Shared Image Gallery, you've already created some of the variables we need. If not, please setup some variables to be used for this example.
52
54
53
-
For Preview, image builder will only support creating custom images in the same Resource Group as the source managed image. Update the resource group name in this example to be the same resource group as your source managed image.
54
-
55
55
56
56
```console
57
57
# Resource group name
@@ -84,17 +84,16 @@ sigDefImgVersionId=$(az sig image-version list \
If you already have your own Shared Image Gallery, and did not follow the previous example, you will need to assign permissions for Image Builder to access the Resource Group, so it can access the gallery.
89
-
87
+
## Create a user-assigned identity and set permissions on the resource group
88
+
As you had set the user-identity up in the previous example, you just need to get the Resource ID of it, this will then be appended to the template.
imgBuilderId=$(az identity list -g $sigResourceGroup --query "[?contains(name, 'aibBuiUserId')].id" -o tsv)
96
93
```
97
94
95
+
If you already have your own Shared Image Gallery, and did not follow the previous example, you will need to assign permissions for Image Builder to access the Resource Group, so it can access the gallery. Please review the steps in the [Create an image and distribute to a Shared Image Gallery](image-builder-gallery.md) example.
96
+
98
97
99
98
## Modify helloImage example
100
99
You can review the example we are about to use by opening the .json file here: [helloImageTemplateforSIGfromSIG.json](https://raw.githubusercontent.com/danielsollondon/azvmimagebuilder/master/quickquickstarts/2_Creating_a_Custom_Linux_Shared_Image_Gallery_Image_from_SIG/helloImageTemplateforSIGfromSIG.json) along with the [Image Builder template reference](image-builder-json.md).
@@ -112,6 +111,7 @@ sed -i -e "s%<sigDefImgVersionId>%$sigDefImgVersionId%g" helloImageTemplateforSI
112
111
sed -i -e "s/<region1>/$location/g" helloImageTemplateforSIGfromSIG.json
113
112
sed -i -e "s/<region2>/$additionalregion/g" helloImageTemplateforSIGfromSIG.json
114
113
sed -i -e "s/<runOutputName>/$runOutputName/g" helloImageTemplateforSIGfromSIG.json
114
+
sed -i -e "s%<imgBuilderId>%$imgBuilderId%g" helloImageTemplateforSIGfromSIG.json
115
115
```
116
116
117
117
## Create the image
@@ -179,4 +179,4 @@ az sig image-version list -g $sigResourceGroup -r $sigName -i $imageDefName -o t
179
179
180
180
## Next steps
181
181
182
-
To learn more about the components of the .json file used in this article, see [Image builder template reference](../linux/image-builder-json.md?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
182
+
To learn more about the components of the .json file used in this article, see [Image builder template reference](../linux/image-builder-json.md?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
0 commit comments