Skip to content

Commit 28c9ce5

Browse files
Merge pull request #234132 from divargas-msft/patch-6
[Doc-a-thon] Updating template-description.md
2 parents 7c5ce82 + 5116a64 commit 28c9ce5

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

articles/virtual-machines/windows/template-description.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@ ms.service: virtual-machines
66
ms.workload: infrastructure
77
ms.custom: devx-track-arm-template
88
ms.topic: how-to
9-
ms.date: 01/03/2019
9+
ms.date: 04/11/2023
1010
ms.author: cynthn
1111
---
1212

1313
# Virtual machines in an Azure Resource Manager template
14-
**Applies to:** :heavy_check_mark: Windows VMs
14+
15+
**Applies to:** :heavy_check_mark: Windows VMs
1516

1617
This article describes aspects of an Azure Resource Manager template that apply to virtual machines. This article doesn't describe a complete template for creating a virtual machine; for that you need resource definitions for storage accounts, network interfaces, public IP addresses, and virtual networks. For more information about how these resources can be defined together, see the [Resource Manager template walkthrough](../../azure-resource-manager/templates/quickstart-create-templates-use-the-portal.md).
1718

1819
There are many [templates in the gallery](https://azure.microsoft.com/resources/templates/?term=VM) that include the VM resource. Not all elements that can be included in a template are described here.
1920

20-
21-
2221
This example shows a typical resource section of a template for creating a specified number of VMs:
2322

2423
```json
@@ -134,9 +133,9 @@ This example shows a typical resource section of a template for creating a speci
134133
]
135134
}
136135
]
137-
```
136+
```
138137

139-
> [!NOTE]
138+
> [!NOTE]
140139
>This example relies on a storage account that was previously created. You could create the storage account by deploying it from the template. The example also relies on a network interface and its dependent resources that would be defined in the template. These resources are not shown in the example.
141140
>
142141
>
@@ -157,7 +156,6 @@ Use these opportunities for getting the latest API versions:
157156
- PowerShell - [Get-AzResourceProvider](/powershell/module/az.resources/get-azresourceprovider)
158157
- Azure CLI - [az provider show](/cli/azure/provider)
159158

160-
161159
## Parameters and variables
162160

163161
[Parameters](../../azure-resource-manager/templates/syntax.md) make it easy for you to specify values for the template when you run it. This parameters section is used in the example:
@@ -228,7 +226,7 @@ Also, notice in the example that the loop index is used when specifying some of
228226
}
229227
```
230228

231-
> [!NOTE]
229+
> [!NOTE]
232230
>This example uses managed disks for the virtual machines.
233231
>
234232
>
@@ -270,17 +268,17 @@ To set this property, the network interface must exist. Therefore, you need a de
270268
## Profiles
271269

272270
Several profile elements are used when defining a virtual machine resource. Some are required and some are optional. For example, the hardwareProfile, osProfile, storageProfile, and networkProfile elements are required, but the diagnosticsProfile is optional. These profiles define settings such as:
273-
271+
274272
- [size](../sizes.md)
275273
- [name](/azure/architecture/best-practices/resource-naming) and credentials
276274
- disk and [operating system settings](cli-ps-findimage.md)
277275
- [network interface](/previous-versions/azure/virtual-network/virtual-network-deploy-multinic-classic-ps)
278276
- boot diagnostics
279277

280278
## Disks and images
281-
279+
282280
In Azure, vhd files can represent [disks or images](../managed-disks-overview.md). When the operating system in a vhd file is specialized to be a specific VM, it's referred to as a disk. When the operating system in a vhd file is generalized to be used to create many VMs, it's referred to as an image.
283-
281+
284282
### Create new virtual machines and new disks from a platform image
285283

286284
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:
@@ -300,11 +298,14 @@ If you want to create a Linux operating system, you might use this definition:
300298
"imageReference": {
301299
"publisher": "Canonical",
302300
"offer": "UbuntuServer",
303-
"sku": "14.04.2-LTS",
301+
"sku": "20.04.2-LTS",
304302
"version": "latest"
305303
},
306304
```
307305

306+
> [!NOTE]
307+
> Modify `publisher`, `offer`, `sku` and `version` values accordingly.
308+
308309
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):
309310

310311
```json
@@ -443,7 +444,7 @@ When you deploy a template, Azure tracks the resources that you deployed as a gr
443444
If you're curious about the status of resources in the deployment, view the resource group in the Azure portal:
444445

445446
![Get deployment information](./media/template-description/virtual-machines-deployment-info.png)
446-
447+
447448
It's not a problem to use the same template to create resources or to update existing resources. When you use commands to deploy templates, you have the opportunity to say which [mode](../../azure-resource-manager/templates/deploy-powershell.md) you want to use. The mode can be set to either **Complete** or **Incremental**. The default is to do incremental updates. Be careful when using the **Complete** mode because you may accidentally delete resources. When you set the mode to **Complete**, Resource Manager deletes any resources in the resource group that aren't in the template.
448449

449450
## Next Steps

0 commit comments

Comments
 (0)