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/windows/image-builder.md
+4-8Lines changed: 4 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: In this article, you learn how to create a Windows VM by using VM I
4
4
author: kof-f
5
5
ms.author: kofiforson
6
6
ms.reviewer: cynthn
7
-
ms.date: 04/23/2021
7
+
ms.date: 04/11/2023
8
8
ms.topic: how-to
9
9
ms.service: virtual-machines
10
10
ms.subservice: image-builder
@@ -27,11 +27,9 @@ In this article, you learn how to create a customized Windows image by using Azu
27
27
28
28
Use the following sample JSON template to configure the image: [helloImageTemplateWin.json](https://raw.githubusercontent.com/danielsollondon/azvmimagebuilder/master/quickquickstarts/0_Creating_a_Custom_Windows_Managed_Image/helloImageTemplateWin.json).
29
29
30
-
31
30
> [!NOTE]
32
31
> Windows users can run the following Azure CLI examples on [Azure Cloud Shell](https://shell.azure.com) by using Bash.
33
32
34
-
35
33
## Register the features
36
34
37
35
To use VM Image Builder, you need to register the feature. Check your registration by running the following commands:
@@ -54,12 +52,10 @@ az provider register -n Microsoft.Storage
54
52
az provider register -n Microsoft.Network
55
53
```
56
54
57
-
58
55
## Set variables
59
56
60
57
Because you'll be using some pieces of information repeatedly, create some variables to store that information:
61
58
62
-
63
59
```azurecli-interactive
64
60
# Resource group name - we're using myImageBuilderRG in this example
65
61
imageResourceGroup='myWinImgBuilderRG'
@@ -76,6 +72,7 @@ Create a variable for your subscription ID:
76
72
```azurecli-interactive
77
73
subscriptionID=$(az account show --query id --output tsv)
78
74
```
75
+
79
76
## Create the resource group
80
77
81
78
To store the image configuration template artifact and the image, use the following resource group:
@@ -92,7 +89,7 @@ VM Image Builder uses the provided [user-identity](../../active-directory/manage
92
89
93
90
Create a user-assigned identity so that VM Image Builder can access the storage account where the script is stored.
94
91
95
-
```bash
92
+
```azurecli-interactive
96
93
identityName=aibBuiUserId$(date +'%s')
97
94
az identity create -g $imageResourceGroup -n $identityName
98
95
@@ -250,12 +247,11 @@ When you're done, delete the resources you've created.
250
247
```
251
248
252
249
1. Delete the image resource group.
253
-
250
+
254
251
```azurecli-interactive
255
252
az group delete -n $imageResourceGroup
256
253
```
257
254
258
-
259
255
## Next steps
260
256
261
257
To learn more about the components of the JSON file that this article uses, see the [VM Image Builder template reference](../linux/image-builder-json.md).
0 commit comments