Automated Image Creation with the Azure Image Builder – Create and Manage Session Host Images

Automated Image Creation with the Azure Image Builder

Azure Image Builder (AIB) is a free, Azure-native tool that allows you to automate the image creation process, and you can still add customization with a PowerShell/Python/

Shell script. AIB uses CLI and PowerShell commands to automate image creation with Microsoft.VirtualMachineImages provider. See Figure 7-6.

Figure 7-6.  Creating an image, AIB flow

AIB allows you to automate the source, customization, and distribution of the image to the shared image gallery.

With AIB, you can migrate your existing image customization pipeline to Azure while continuing to use existing scripts, commands, and processes to customize images. Using Image Builder, you can integrate your core applications into a VM image so your VMs can take on workloads immediately after creation. You can even add configurations to build images for Azure Virtual Desktop or as VHDs for use in Azure Stack or for ease of exporting.

Image Builder lets you start with Windows or Linux images from the Azure Marketplace or existing custom images and add your own customizations. You can also specify how you would like your resulting images hosted in the Azure Compute Gallery (formerly known as the Shared Image Gallery), as managed images or as VHDs.

Creating and Using a Shared Image Gallery

A shared image gallery, which is now known as the Azure Compute Gallery, helps admins/operation teams to share images and application packages across subscriptions in your organization. The Azure Compute Gallery lets you store custom VM images and application packages and share them within or across regions. The image gallery also lets you choose a region to replicate the images and select storage residency (LRS, ZRS). You can create multiple galleries so that you can logically group resources and apply Azure role-based access control (Azure RBAC).

An Azure Compute Gallery provides the following:

•\   Global replication.

•\   Versioning and grouping of resources for easier management.

•\   Highly available resources with zone redundant storage (ZRS)

accounts in regions that support availability zones. ZRS offers better resilience against zonal failures.

•\   Premium storage support (Premium_LRS).

•\   Sharing across subscriptions, and even between Active Directory (AD) tenants, using Azure RBAC.

•\   Scaling your deployments with resource replicas in each region.

You can share image and application with different users, service principals, or AD groups within your organization using the image gallery. Resources can be replicated to multiple regions for quicker scaling of your deployments.