Image Templates


The presented resiliency recommendations in this guidance include Image Templates and dependent resources and settings.

Summary of Recommendations

Recommendations Details

IT-1 - Use Generation 2 virtual machine source image

Category: Availability

Impact: Low

Guidance

When building your Image Templates, utilize source images that support generation 2 virtual machines. Generation 2 VMs support key features that aren’t supported in generation 1 VMs.These features include increased memory, support for larger >2TB disks, it uses the new UEFI-based boot architecture rather than the BIOS-based architecture used by generation 1 VMs which can improve boot and installation times, Intel Software Guard Extensions (Intel SGX), and virtualized persistent memory (vPMEM).

Resources



IT-2 - Replicate your Image Templates to a secondary region

Category: Disaster Recovery

Impact: Low

Guidance

The Azure Image Builder service that is used to deploy Image Templates doesn’t currently support availability zones. Therefore, when building your Image Templates, replicate them to a secondary region, preferably to your primary region’s paired region. This will allow you to quickly recover from a region failure and continue to deploy virtual machines from your Image Templates.

Resources

Resource Graph Query

// Azure Resource Graph Query
// List all Image Templates that are not replicated to another region
resources
| where type =~ "microsoft.virtualmachineimages/imagetemplates"
| mv-expand distribution=properties.distribute
| where array_length(parse_json(distribution).replicationRegions) == 1
| project recommendationId = "it-2", name, id, param1=strcat("replicationRegions:",parse_json(distribution).replicationRegions)