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
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ If you used [Create an image and distribute to a Shared Image Gallery](image-bui
53
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.
Copy file name to clipboardExpand all lines: articles/virtual-machines/windows/image-builder-gallery-update-image-version.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ If you used [Create an image and distribute to a Shared Image Gallery](image-bui
55
55
56
56
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.
57
57
58
-
```azurecli-interactive
58
+
```console
59
59
# Resource group name - we are using ibsigRG in this example
60
60
sigResourceGroup=myIBWinRG
61
61
# Datacenter location - we are using West US 2 in this example
@@ -75,7 +75,7 @@ vmpassword="password for the VM"
75
75
76
76
Create a variable for your subscription ID. You can get this using `az account show | grep id`.
77
77
78
-
```azurecli-interactive
78
+
```console
79
79
subscriptionID=<Subscription ID>
80
80
```
81
81
@@ -107,7 +107,7 @@ You can review the example we are about to use by opening the .json file here: [
107
107
108
108
Download the .json example and configure it with your variables.
Copy file name to clipboardExpand all lines: articles/virtual-machines/windows/image-builder.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ az provider register -n Microsoft.Storage
62
62
We will be using some pieces of information repeatedly, so we will create some variables to store that information.
63
63
64
64
65
-
```azurecli-interactive
65
+
```console
66
66
# Resource group name - we are using myImageBuilderRG in this example
67
67
imageResourceGroup=myWinImgBuilderRG
68
68
# Region location
@@ -77,7 +77,7 @@ imageName=aibWinImage
77
77
78
78
Create a variable for your subscription ID. You can get this using `az account show | grep id`.
79
79
80
-
```azurecli-interactive
80
+
```console
81
81
subscriptionID=<Your subscription ID>
82
82
```
83
83
## Create a resource group
@@ -106,7 +106,7 @@ az role assignment create \
106
106
107
107
A parameterized image configuration template has been created for you to try. Download the example .json file and configure it with the variables you set previously.
Copy file name to clipboardExpand all lines: articles/virtual-machines/windows/template-description.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,7 @@ This example shows a typical resource section of a template for creating a speci
153
153
154
154
When you deploy resources using a template, you have to specify a version of the API to use. The example shows the virtual machine resource using this apiVersion element:
155
155
156
-
```
156
+
```json
157
157
"apiVersion": "2016-04-30-preview",
158
158
```
159
159
@@ -170,7 +170,7 @@ Use these opportunities for getting the latest API versions:
170
170
171
171
[Parameters](../../resource-group-authoring-templates.md) make it easy for you to specify values for the template when you run it. This parameters section is used in the example:
172
172
173
-
```
173
+
```json
174
174
"parameters": {
175
175
"adminUsername": { "type": "string" },
176
176
"adminPassword": { "type": "securestring" },
@@ -182,7 +182,7 @@ When you deploy the example template, you enter values for the name and password
182
182
183
183
[Variables](../../resource-group-authoring-templates.md) make it easy for you to set up values in the template that are used repeatedly throughout it or that can change over time. This variables section is used in the example:
@@ -219,7 +219,7 @@ When you deploy the example template, variable values are used for the name and
219
219
220
220
When you need more than one virtual machine for your application, you can use a copy element in a template. This optional element loops through creating the number of VMs that you specified as a parameter:
221
221
222
-
```
222
+
```json
223
223
"copy": {
224
224
"name": "virtualMachineLoop",
225
225
"count": "[parameters('numberOfInstances')]"
@@ -228,7 +228,7 @@ When you need more than one virtual machine for your application, you can use a
228
228
229
229
Also, notice in the example that the loop index is used when specifying some of the values for the resource. For example, if you entered an instance count of three, the names of the operating system disks are myOSDisk1, myOSDisk2, and myOSDisk3:
230
230
231
-
```
231
+
```json
232
232
"osDisk": {
233
233
"name": "[concat('myOSDisk', copyindex())]",
234
234
"caching": "ReadWrite",
@@ -243,7 +243,7 @@ Also, notice in the example that the loop index is used when specifying some of
243
243
244
244
Keep in mind that creating a loop for one resource in the template may require you to use the loop when creating or accessing other resources. For example, multiple VMs can’t use the same network interface, so if your template loops through creating three VMs it must also loop through creating three network interfaces. When assigning a network interface to a VM, the loop index is used to identify it:
@@ -254,7 +254,7 @@ Keep in mind that creating a loop for one resource in the template may require y
254
254
255
255
Most resources depend on other resources to work correctly. Virtual machines must be associated with a virtual network and to do that it needs a network interface. The [dependsOn](../../resource-group-define-dependencies.md) element is used to make sure that the network interface is ready to be used before the VMs are created:
@@ -264,7 +264,7 @@ Resource Manager deploys in parallel any resources that aren't dependent on anot
264
264
265
265
How do you know if a dependency is required? Look at the values you set in the template. If an element in the virtual machine resource definition points to another resource that is deployed in the same template, you need a dependency. For example, your example virtual machine defines a network profile:
@@ -293,7 +293,7 @@ In Azure, vhd files can represent [disks or images](managed-disks-overview.md?to
293
293
294
294
When you create a VM, you must decide what operating system to use. The imageReference element is used to define the operating system of a new VM. The example shows a definition for a Windows Server operating system:
295
295
296
-
```
296
+
```json
297
297
"imageReference": {
298
298
"publisher": "MicrosoftWindowsServer",
299
299
"offer": "WindowsServer",
@@ -304,7 +304,7 @@ When you create a VM, you must decide what operating system to use. The imageRef
304
304
305
305
If you want to create a Linux operating system, you might use this definition:
306
306
307
-
```
307
+
```json
308
308
"imageReference": {
309
309
"publisher": "Canonical",
310
310
"offer": "UbuntuServer",
@@ -315,7 +315,7 @@ If you want to create a Linux operating system, you might use this definition:
315
315
316
316
Configuration settings for the operating system disk are assigned with the osDisk element. The example defines a new managed disk with the caching mode set to **ReadWrite** and that the disk is being created from a [platform image](cli-ps-findimage.md):
317
317
318
-
```
318
+
```json
319
319
"osDisk": {
320
320
"name": "[concat('myOSDisk', copyindex())]",
321
321
"caching": "ReadWrite",
@@ -327,7 +327,7 @@ Configuration settings for the operating system disk are assigned with the osDis
327
327
328
328
If you want to create virtual machines from existing disks, remove the imageReference and the osProfile elements and define these disk settings:
329
329
330
-
```
330
+
```json
331
331
"osDisk": {
332
332
"osType": "Windows",
333
333
"managedDisk": {
@@ -342,7 +342,7 @@ If you want to create virtual machines from existing disks, remove the imageRefe
342
342
343
343
If you want to create a virtual machine from a managed image, change the imageReference element and define these disk settings:
@@ -360,7 +360,7 @@ If you want to create a virtual machine from a managed image, change the imageRe
360
360
361
361
You can optionally add data disks to the VMs. The [number of disks](sizes.md) depends on the size of operating system disk that you use. With the size of the VMs set to Standard_DS1_v2, the maximum number of data disks that could be added to the them is two. In the example, one managed data disk is being added to each VM:
362
362
363
-
```
363
+
```json
364
364
"dataDisks": [
365
365
{
366
366
"name": "[concat('myDataDisk', copyindex())]",
@@ -376,7 +376,7 @@ You can optionally add data disks to the VMs. The [number of disks](sizes.md) de
376
376
377
377
Although [extensions](extensions-features.md) are a separate resource, they're closely tied to VMs. Extensions can be added as a child resource of the VM or as a separate resource. The example shows the [Diagnostics Extension](extensions-diagnostics-template.md) being added to the VMs:
@@ -411,7 +411,7 @@ This extension resource uses the storageName variable and the diagnostic variabl
411
411
412
412
There are many extensions that you can install on a VM, but the most useful is probably the [Custom Script Extension](extensions-customscript.md). In the example, a PowerShell script named start.ps1 runs on each VM when it first starts:
0 commit comments