Skip to content

Commit 49d9b24

Browse files
Merge pull request #234141 from divargas-msft/patch-8
[Doc-a-thon] Updating image-builder.md
2 parents 28c9ce5 + 973ff7b commit 49d9b24

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Create Linux VM images with Azure VM Image Builder and Azure Comput
44
author: kof-f
55
ms.author: kofiforson
66
ms.reviewer: cynthn
7-
ms.date: 03/02/2020
7+
ms.date: 04/11/2023
88
ms.topic: how-to
99
ms.service: virtual-machines
1010
ms.subservice: image-builder
@@ -16,13 +16,12 @@ ms.custom: devx-track-azurecli
1616

1717
In this article, you learn how to use Azure VM Image Builder and the Azure CLI to create an image version in an [Azure Compute Gallery](../shared-image-galleries.md) (formerly Shared Image Gallery) and then distribute the image globally. You can also create an image version by using [Azure PowerShell](../windows/image-builder-gallery.md).
1818

19-
2019
This article uses a sample JSON template to configure the image. The JSON file is at [helloImageTemplateforSIG.json](https://github.com/danielsollondon/azvmimagebuilder/blob/master/quickquickstarts/1_Creating_a_Custom_Linux_Shared_Image_Gallery_Image/helloImageTemplateforSIG.json).
2120

2221
To distribute the image to an Azure Compute Gallery, the template uses [sharedImage](image-builder-json.md#distribute-sharedimage) as the value for the `distribute` section of the template.
2322

24-
2523
## Register the features
24+
2625
To use VM Image Builder, you need to register the feature. Check your registration by running the following commands:
2726

2827
```azurecli-interactive
@@ -43,7 +42,7 @@ az provider register -n Microsoft.Storage
4342
az provider register -n Microsoft.Network
4443
```
4544

46-
## Set variables and permissions
45+
## Set variables and permissions
4746

4847
Because you'll be using some pieces of information repeatedly, create some variables to store that information.
4948

@@ -80,7 +79,7 @@ az group create -n $sigResourceGroup -l $location
8079

8180
VM Image Builder uses the provided [user-identity](../../active-directory/managed-identities-azure-resources/qs-configure-cli-windows-vm.md#user-assigned-managed-identity) to inject the image into an Azure Compute Gallery. In this example, you create an Azure role definition with specific actions for distributing the image. The role definition is then assigned to the user identity.
8281

83-
```bash
82+
```azurecli-interactive
8483
# Create user-assigned identity for VM Image Builder to access the storage account where the script is stored
8584
identityName=aibBuiUserId$(date +'%s')
8685
az identity create -g $sigResourceGroup -n $identityName
@@ -111,7 +110,6 @@ az role assignment create \
111110
--scope /subscriptions/$subscriptionID/resourceGroups/$sigResourceGroup
112111
```
113112

114-
115113
## Create an image definition and gallery
116114

117115
To use VM Image Builder with Azure Compute Gallery, you need to have an existing gallery and image definition. VM Image Builder doesn't create the gallery and image definition for you.
@@ -139,7 +137,6 @@ az sig image-definition create \
139137
--os-type Linux
140138
```
141139

142-
143140
## Download and configure the JSON file
144141

145142
Download the JSON template and configure it with your variables:
@@ -183,7 +180,6 @@ az resource invoke-action \
183180

184181
It can take a few moments to create the image and replicate it to both regions. Wait until this part is finished before you move on to create a VM.
185182

186-
187183
## Create the VM
188184

189185
Create the VM from the image version that was created by VM Image Builder.
@@ -261,7 +257,7 @@ When you're deleting gallery resources, you need delete all the image versions b
261257
--gallery-name $sigName \
262258
--gallery-image-definition $imageDefName \
263259
--subscription $subscriptionID
264-
```
260+
```
265261
266262
1. Delete the image definition.
267263

0 commit comments

Comments
 (0)