Build VM Image Builder templates with platform sources, customization steps, validation, and Shared Image Gallery distribution.
Build VM Image Builder templates with platform/marketplace sources, customization steps, validation, and Shared Image Gallery distribution.
Required Fields
templateNameresourceGroupsource.typecustomizedistributeOutput will appear here...The builder validates that templateName, resourceGroup, source.type, customize, and distribute all resolve before accepting the JSON as a valid Image Template resource, the fields Image Builder needs to know the source image, the customization pipeline, and where to publish results; it can't verify referenced script URIs are reachable or that checksums match, those are only checked when the actual build runs.
Build an Azure VM Image Builder template chaining customize steps (WindowsUpdate, PowerShell, File copy, WindowsRestart) executed strictly in array order against a source image, then validate steps that run inside the built VM before distribute publishes the result to a Shared Image Gallery. validate.continueDistributeOnFailure: false means a failed in-VM validation script blocks the image from being distributed at all, the build produces no usable gallery image version, which is the right default for a security-baseline validation but means a flaky (not genuinely failing) validation script can block an otherwise-good image build entirely, worth distinguishing from a validation that's correctly catching a real problem.
Verify scriptUri-referenced scripts have a correct, current sha256Checksum, a checksum mismatch fails the build cleanly, which is actually the safer failure mode versus silently trusting a script that could have been tampered with or simply changed unexpectedly at the source.
Order customize steps deliberately, treating the array as a literal sequential script, not an unordered bag of customizations, a step depending on a prior step's effect (like installing software before validating it) breaks if the order is wrong.
continueDistributeOnFailure: false is the right default for any validation meant as a genuine quality gate, but a validation script itself needs to be reliable and non-flaky, or you'll block good builds on a validation bug rather than a real image problem.
Strictly in array order, this is deliberate and load-bearing, a WindowsUpdate step listed after a PowerShell installation step runs after that installation, not before, if the order in the example (WindowsUpdate, then PowerShell installs) matters for your build's correctness, reordering the array changes actual build behavior, not just documentation.
The image build doesn't proceed to the distribute phase at all, no gallery image version is published from that build. This is the intended behavior for a validation step meant to be a hard gate (confirming required software is actually installed, as the example's git/code check does), a failed validation means the build produced something that doesn't meet requirements and shouldn't be distributed.
Just the finished, already-built image version, the actual build (source image plus customize steps) happens once in the region where Image Builder runs, and the resulting image version is then replicated to each region listed in replicationRegions for the Shared Image Gallery. This is significantly more efficient than running the full customize/validate pipeline separately per region.
Was this tool helpful?
Disclaimer: This tool runs entirely in your browser. No data is sent to our servers. Always verify outputs before using them in production. AWS, Azure, and GCP are trademarks of their respective owners.