Introduction
Azure Compute Gallery (formerly Shared Image Gallery) is a powerful tool that allows organizations to manage, share, and distribute custom virtual machine (VM) images across multiple regions in Azure. This feature is handy for enterprises looking to standardize VM deployments, improve image management, and enhance scalability. In this guide, I will walk you through the step-by-step process of creating an Azure Compute Gallery and capturing the image of a virtual machine (VM) using the Azure Portal.
Step 1: Navigate to Azure Compute Gallery
- Sign in to the Azure Portal.
- In the Search bar, type "Azure Compute Gallery" and select it from the results.
3.Click "Create" to start the setup.
Step 2: Configure the Compute Gallery
Once you initiate the creation process, configure the following settings:
- Subscription: Choose the Azure subscription where you want to create the gallery.
- Resource Group: Select an existing resource group or create a new one.
- Gallery Name: Enter a unique and descriptive name for your compute gallery.
Region: Choose the Azure region where the gallery will be hosted.
Click "Review + Create", then "Create" to deploy the Compute Gallery.
With the above simple steps, we've been able to successfully create an Azure Compute Gallery called "DataDiskGallery". It is now time to capture an image of a VM.
Step 3: Capture an Image of a Virtual Machine (VM)
After setting up the Azure Compute Gallery, follow these steps to capture a VM image:
-
Navigate to the VM
- In the Azure Portal, go to Virtual Machines.
- Select the VM you want to capture - I chose the DataDiskVM1 created in my previous post on this platform
-
Deallocate the VM
- Click Stop to deallocate the VM.
- Ensure the VM status changes to Stopped (deallocated).
-
Capture the Image
- In the top panel, click on Capture followed by Image.
On the Basics tab, select an existing resource group or create a new one. Note that the region is automatically set at this stage to be the same as that of the VM we intend to capture.
Select the Gallery and Image Definition to store the captured image. Selected the DataDiskGallery created above.
For the Operating System State, I chose Generalized. Which requires a hostname, admin user, password, and other VM-related setup to be completed on the first boot.
Create a new Target VM Image definition. Where parameters like VM image definition name, Publisher, Offer, and Stock Keeping Unit (SKU) are configured.
Enter a Version number and End of life date of your choice.
For the replication of the VM image version. The Default replica count is set to 1. You can decide how many replicas you need.
- Click Review + Create, then Create to capture the VM image.
- Click Go to Resource to check out the newly captured VM.
Step 4: Verify and Use the Captured Image
- Navigate to Azure Compute Gallery in the portal.
- Click on your newly created gallery and verify the captured VM image.
- You can now:
- Use the captured image to create new VMs.
It is important to note that from a captured VM image, one can either create a Virtual Machine or a Virtual Machine Scale Set (VMSS).
There goes our newly created Microsoft compute captured VM.
Conclusion
Creating an Azure Compute Gallery and capturing a VM image using the Azure Portal is a seamless process that enhances image management and VM deployment. By following the steps outlined in this guide, you can standardize your virtual machines, improve consistency across environments, and streamline cloud operations.
With the ability to store, share, and distribute VM images efficiently, Azure Compute Gallery is a must-have for organizations leveraging Azure for scalable and repeatable infrastructure deployments. Start optimizing your cloud workflows today! 🚀
Top comments (0)