Azure Shared Image Gallery and Windows Virtual Desktop

Table of Contents

Shared Image Gallery

Shared Image Gallery help you share your custom VM images with others in your organization, within or across regions, within an AAD tenant. Also enables us to build all our VM images from a single Master VM ( Golden Image ) and use it to deploy IaaS VMs as well as we can use it for Windows Virtual Desktop Deployment, You can for example have a Definition for each golden image that you use for a hostpool. You can have an image definition for your IT Team, another one for call center with their special software and an incident management system, and another image definition for your power users like graphic designer with adobe and designing tools. Create Custom Windows 10 Image for WVD How to manage and deploy custom images (including versioning) with the Azure Shared Image Gallery

Divided into the following steps:

  1. Deploy a Virtual Machine for creating and customizing the image
  2. Make a disk Snapshot
  3. Creating a Virtual Machine Capture
  4. Create a Shared Image Gallery
  5. Add an image to the Shared Image Gallery

Deploy a Virtual Machine for Master Image

Make a disk Snapshot

Keep in mind that You can run the Sysprep command up to 8 times on a single Windows image, then you must recreate your Windows image for another sysprep, hence we will take a Snapshot of the master vm before any sysprep activity. Deallocate the VM

Open Disk blade then click on the disk

 

Create a snapshot

 

Creating a Virtual Machine Capture

Now lets sysprep the windows and capture the vm

 

 

 

NOTE: Since Capturing a virtual machine image will make the virtual machine unusable. Would be better to Select Automatically delete this virtual machine after creating the image for VM Cleaning up.

 

Create a Shared Image Gallery

Shared images can be replicated to multiple regions, for quicker scaling of your deployments. When you create a VM from the image, a copy of the VHDs in the image are used to create the disks for the new VM. The image remains in storage and can be used over and over again to create new VMs. If you have a large number of images that you need to maintain and would like to make them available throughout your company, you can use a Shared Image Gallery as a repository. Create an Azure Shared Image Gallery using the portal

  1. Sign into the Azure portal at https://portal.azure.com.
  2. Use the type Shared image gallery in the search box and select Shared image gallery in the results.
  3. In the Shared image gallery page, click Create.

 

Select the Subscription and Resource group then give the instance a name, select the Region and last Click Review + create

 

Add an image to the Shared Image Gallery

 

When we need to deploy Windows, virtual machines using Terraform or if we need to create a image in Azure, we will need to find the image information of the operating system.

The information required to deploy a Windows virtual machine is:

  • Publisher: The organization that created the image. Examples: MicrosoftWindowsServer, MicrosoftWindowsDesktop
  • Offer: The name of a group of related images created by a publisher. Examples: WindowsServer, Windows-10
  • SKU: An instance of an offer, such as a major release of a distribution. Examples: 2019-Datacenter, windows-10-1909-vhd-client-office-prod-stage, windows-10-2004-vhd-client-office-prod-stage
  • Version: The version number of an image SKU. Examples: 20h1-evd-o365pp, 19h2-pro-g2.

 

Listing Image Offers

Open our Azure Cloud Shell (PowerShell) or Azure PowerShell CLI.

Connect-AzAccount -TenantId “” $publisher = “MicrosoftWindowsDesktop” $location = “West Europe” Listing Image Offers Get-AzVMImageOffer -Location $location -PublisherName $publisher | Select Offer

 

Listing Image SKUs $offer = “windows-10-2004-vhd-client-office-prod-stage” Get-AzVMImageSku -Location $location -PublisherName $publisher -Offer $offer | Select Skus 

Now we have the right Offer and SKU lets continue with the creation.

Update the Offer and SKU with the output that we got from PowerShell.

 

 

The image version name in the semantic version pattern. The allowed characters are digit and period.

For example: 0.0.1, 15.35.0, x.x.x format.

 

 

Click Review + create 

 

 

 

Mahmoud A. ATALLAH

Microsoft MVP & MCT | Azure Service Delivery Lead with over 12 years of experience in Microsoft solutions and Professional services, Leading the Azure team to help our customers to build successful Azure practices, Blogger, Speaker, and Community leader. Focus on Azure, Cloud Security, Modern Workspace, AVD, Infrastructure as Code, Endpoint Management, Office 365, EMS.

Recent Posts

Microsoft MVP Summit 2024 Experience: A Journey to Seattle

A few weeks ago, Microsoft MVPs (Most Valuable Professionals) and RDs (Regional Directors) got together…

1 month ago

Web Summit Qatar | AI Copilots: Driving startup success

Description: Join us at Web Summit Qatar for an engaging session on how Azure AI…

2 months ago

My 2023 Highlights: A Year of Growth and Achievements 🌟

As the year 2023 draws to a close, it's the perfect time to reflect on…

4 months ago

Investigate and Respond to Incidents with Microsoft Security Copilot

Introduction Imagine harnessing the power of GPT-powered natural language to seamlessly investigate and respond to…

6 months ago

Introducing Microsoft Applied Skills – Your Fast Track to Verify Tech Proficiency

Introduction: In a dynamic tech landscape, Microsoft continues to pioneer innovative ways to empower individuals…

6 months ago

GITEX GLOBAL | Azure AI and the Future of SaaS

Description: Join us at GITEX as we explore the exciting world of Azure AI and…

7 months ago