DEV Community

Cover image for Azure VM Scale Set #Part 2: How to Capture the image of a VM with Azure Compute Gallery

Azure VM Scale Set #Part 2: How to Capture the image of a VM with Azure Compute Gallery

Capturing a virtual machine image is a crucial step in creating reusable, standardized deployments in Azure. In this second part of our Azure VM Scale Set series, we’ll walk you through the process of capturing a VM image using Azure Compute Gallery. This ensures consistency and efficiency when scaling your infrastructure or deploying identical VMs (VMSS) across your environment.

What is an Azure Compute Gallery?

Azure Compute Gallery (formerly known as Shared Image Gallery) is a service in Microsoft Azure that simplifies the management, storage, and sharing of custom virtual machine images. It allows you to create, manage, and distribute custom images efficiently across multiple Azure regions, enabling standardized deployments and scaling for large environments.

Azure Compute Gallery

Note: this is a continuation from the article Azure VM Scale Set #Part 1: How to Connect and Add a Data Disk to a Windows VM Make sure to go over that before moving on.

Let us dive into the compute gallery setup!


Part 2: How to Capture the image of a Virtual Machine

Step 1: Create an Azure Compute Gallery

  • Search Compute gallery in the Azure portal and select the highlighted option
    Compute gallery

  • Click on Create
    Create

  • Select the same Resource group allocated to the VM

  • Give the compute gallery a Name

  • You can also add a Description (optional)

  • Take the rest of the settings as default

  • Click Review and create

Creating CG

Creating CG

  • Click Go to resource

Go to resource

Step 2: Capture the image of a VM and store in a Compute Gallery

  • Go back to the VM created
  • Click on the Capture button and select Image from the drop-down
    Image of the VM

  • Make sure the VM and the compute gallery are in the same resource group.

  • Select the Compute gallery created

Creating Image

  • In the Operating system state, select Specialized Note: If Generalized, the VMs created from the image would require admin user (user/password) and other VM setups, while Specialized is already configured.
  • In the Target VM image definition section, Create new
  • Give the VM image a Name
  • Select Ok
    Image of the VM

  • Give the VM image a Version number

  • Click on Review and create.
    Image of the VM

Create image

  • Wait till deployed and click Go to resource Go to resource

CONTINUE TO THE NEXT PART
Azure VM Scale Set #Part 3: How to Create a Virtual Machine scale set in Azure


Thank you for reading my blog.😊😊

If you need further assistance, feel free to reach out in the comment or hit me up on Twitter. You can also follow me on GitHub. My DM's are open and love discussions on cloud topics!😁

Top comments (0)