DEV Community

Cover image for How to Create an Azure Compute Gallery and Capturing a VM Image
Tawo Wilmer Busa
Tawo Wilmer Busa

Posted on

How to Create an Azure Compute Gallery and Capturing a VM Image

Introduction
An Azure Compute Gallery allows you to store, manage, and share custom VM images across multiple subscriptions and regions. This article will walk you through creating an Azure Compute Gallery and capturing a VM image using an Azure Portal.
Step 1: Create an Azure Compute Gallery

Image description

  • Navigate to Compute Gallery

Search for "Azure Compute Galleries" in Azure Portal

Image description
Click "Create"

Image description

  • Configure the gallery settings:

Choose a resource group
Enter a name for the gallery and region
Click "Review + Create" → "Create"

Image description

Image description

  • Deployment in progress

Image description

  • Azure compute gallery created: Now we can create and deploy custom images

Image description
Step 2: Capture a VM Image and Add It to the Compute Gallery

  • Go to "Virtual Machines" in the Azure portal
  • Select the VM you want to capture

Image description
Deallocate the VM (Required before capturing the image)

  • Under "OS state", select Specialized (since the VM is not generalized)

Image description

  • Create an Image Definition

Click "Create" → "Image Definition"
Enter a name and choose the operating system
Select the VM generation (Gen1 or Gen2)
Leave everything else as default and click ok
Choose "Specialized" under "OS State"

Image description

  • Create an Image Version

Version number: Choose 0.0.1

Image description

  • Click "Review + Create" → "Create"

Image description

Image description

  • Deployment in process

Image description

  • Deployment is complete

Then go to resource

Image description

  • Click on create VM

Image description
Scroll down to image and notice that the one we just created is listed among the available images

Image description
Conclusion
By completing these steps, you have successfully created an Azure Compute Gallery, captured a specialized VM image, and deployed new VMs from it.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay