Skip to content

Commit d88ba55

Browse files
march 2020 updates
1 parent 870fc50 commit d88ba55

File tree

1 file changed

+49
-27
lines changed

1 file changed

+49
-27
lines changed

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

Lines changed: 49 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Create an Azure Image Builder template (preview)
33
description: Learn how to create a template to use with Azure Image Builder.
44
author: danis
55
ms.author: danis
6-
ms.date: 01/23/2020
6+
ms.date: 03/20/2020
77
ms.topic: article
88
ms.service: virtual-machines-linux
99
ms.subservice: imaging
@@ -30,7 +30,12 @@ This is the basic template format:
3030
"buildTimeoutInMinutes": <minutes>,
3131
"vmProfile":
3232
{
33-
"vmSize": "<vmSize>"
33+
"vmSize": "<vmSize>",
34+
"osDiskSizeGB": <sizeInGB>,
35+
"vnetConfig": {
36+
"name": "<vnetName>",
37+
"subnetName": "<subnetName>",
38+
"resourceGroupName": "<vnetRgName>"
3439
},
3540
"build": {},
3641
"customize": {},
@@ -59,6 +64,8 @@ The location is the region where the custom image will be created. For the Image
5964
- West Central US
6065
- West US
6166
- West US 2
67+
- North Europe
68+
- West Europe
6269

6370

6471
```json
@@ -75,14 +82,24 @@ By default Image Builder will use a "Standard_D1_v2" build VM, you can override
7582

7683
## osDiskSizeGB
7784

78-
By default, Image Builder will not change the size of the image, it will use the size from the source image. You can adjust the size of the OS Disk (Win and Linux), note, do not go too small than the minimum required space required for the OS. This is optional, and a value of 0 means leave the same size as the source image. This is optional.
85+
By default, Image Builder will not change the size of the image, it will use the size from the source image. You can increase the size of the OS Disk (Win and Linux), this is optional, and a value of 0 means leave the same size as the source image.
7986

8087
```json
8188
{
8289
"osDiskSizeGB": 100
8390
},
8491
```
8592

93+
## vnetConfig
94+
If you do not specify any VNET properties, then Image Builder will create its own VNET, Public IP, and NSG. The Public IP is used for the service to communicate with the build VM, however if you do not want a Public IP or want Image Builder to have access to your existing VNET resources, such as configuration servers (DSC, Chef, Puppet, Ansible), file shares etc, then you can specify a VNET. For more information, review the [networking documentation](https://github.com/danielsollondon/azvmimagebuilder/blob/master/aibNetworking.md#networking-with-azure-vm-image-builder), this is optional.
95+
96+
```json
97+
"vnetConfig": {
98+
"name": "<vnetName>",
99+
"subnetName": "<subnetName>",
100+
"resourceGroupName": "<vnetRgName>"
101+
}
102+
```
86103
## Tags
87104

88105
These are key/value pairs you can specify for the image that's generated.
@@ -127,33 +144,15 @@ For more information on deploying this feature, see [Configure managed identitie
127144
The `source` section contains information about the source image that will be used by Image Builder.
128145

129146
The API requires a 'SourceType' that defines the source for the image build, currently there are three types:
130-
- ISO - use this when the source is a RHEL ISO.
131147
- PlatformImage - indicated the source image is a Marketplace image.
132148
- ManagedImage - use this when starting from a regular managed image.
133149
- SharedImageVersion - this is used when you are using an image version in a Shared Image Gallery as the source.
134150

135151
### ISO source
152+
We are deprecating this functionality from image builder, as there are now [RHEL Bring Your Own Subscription images](https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/redhat/byos), please review the timelines below:
153+
* 31st March 2020 - Image Templates with RHEL ISO sources will now longer be accepted by the resource provider.
154+
* 30th April 2020- Image Templates that contain RHEL ISO sources will not be processed any more.
136155

137-
Azure Image Builder only supports using published Red Hat Enterprise Linux 7.x Binary DVD ISOs, for preview. Image Builder supports:
138-
- RHEL 7.3
139-
- RHEL 7.4
140-
- RHEL 7.5
141-
142-
```json
143-
"source": {
144-
"type": "ISO",
145-
"sourceURI": "<sourceURI from the download center>",
146-
"sha256Checksum": "<checksum associated with ISO>"
147-
}
148-
```
149-
150-
To get the `sourceURI` and `sha256Checksum` values, go to `https://access.redhat.com/downloads` then select the product **Red Hat Enterprise Linux**, and a supported version.
151-
152-
In the list of **Installers and Images for Red Hat Enterprise Linux Server**, you need to copy the link for Red Hat Enterprise Linux 7.x Binary DVD, and the checksum.
153-
154-
> [!NOTE]
155-
> The access tokens of the links are refreshed at frequent intervals, so every time you want to submit a template, you must check if the RH link address has changed.
156-
157156
### PlatformImage source
158157
Azure Image Builder supports Windows Server and client, and Linux Azure Marketplace images, see [here](https://docs.microsoft.com/azure/virtual-machines/windows/image-builder-overview#os-support) for the full list.
159158

@@ -163,7 +162,7 @@ Azure Image Builder supports Windows Server and client, and Linux Azure Marketp
163162
"publisher": "Canonical",
164163
"offer": "UbuntuServer",
165164
"sku": "18.04-LTS",
166-
"version": "18.04.201903060"
165+
"version": "latest"
167166
},
168167
```
169168

@@ -174,8 +173,7 @@ The properties here are the same that are used to create VM's, using AZ CLI, run
174173
az vm image list -l westus -f UbuntuServer -p Canonical --output table –-all
175174
```
176175

177-
> [!NOTE]
178-
> Version cannot be ‘latest’, you must use the command above to get a version number.
176+
You can use 'latest' in the version, the version is evaluated when the image build takes place, not when the template is submitted. If you use this functionality with the Shared Image Gallery destination, you can avoid resubmitting the template, and rerun the image build at intervals, so your images are recreated from the most recent images.
179177

180178
### ManagedImage source
181179

@@ -388,6 +386,30 @@ If there is an error trying to download the file, or put it in a specified direc
388386

389387
Files in the File customizer can be downloaded from Azure Storage using [MSI](https://github.com/danielsollondon/azvmimagebuilder/tree/master/quickquickstarts/7_Creating_Custom_Image_using_MSI_to_Access_Storage).
390388

389+
### Windows Update Customizer
390+
This customizer is built on the [community Windows Update Provisioner](https://packer.io/docs/provisioners/community-supported.html) for Packer, which is an open source project maintained by the Packer community. Microsoft tests and validate the provisioner with the Image Builder service, and will support investigating issues with it, and work to resolve issues, however the open source project is not officially supported by Microsoft. For detailed documentation on and help with the Windows Update Provisioner please see the project repository.
391+
392+
"customize": [
393+
{
394+
"type": "WindowsUpdate",
395+
"searchCriteria": "IsInstalled=0",
396+
"filters": [
397+
"exclude:$_.Title -like '*Preview*'",
398+
"include:$true"
399+
],
400+
"updateLimit": 20
401+
}
402+
],
403+
OS support: Windows
404+
405+
Customize properties:
406+
- **type** – WindowsUpdate.
407+
- **searchCriteria** - Optional, defines which type of updates are installed (Recommended, Important etc), BrowseOnly=0 and IsInstalled=0 (Recommended) is the default.
408+
- **filters** – Optional, allows you to specify a filter to include or exclude updates.
409+
- **updateLimit** – Optional, defines how many updates can be installed, default 1000.
410+
411+
412+
391413
### Generalize
392414
By default, Azure Image Builder will also run ‘deprovision’ code at the end of each image customization phase, to ‘generalize’ the image. Generalizing is a process where the image is set up so it can be reused to create multiple VMs. For Windows VMs, Azure Image Builder uses Sysprep. For Linux, Azure Image Builder runs ‘waagent -deprovision’.
393415

0 commit comments

Comments
 (0)