Introduction
Azure Compute Gallery (formerly Shared Image Gallery) enables customers to manage, share, and replicate VM images across regions. This guide describes how to capture an image of a specialized VM, configure Azure Compute Gallery, and deploy VMs using the image that was captured.
Step 1: Create an Azure Compute Gallery
- Sign in to Azure Portal: Navigate to Azure Portal and sign in.
Navigate to Compute Galleries:
- Search for "Azure Compute Gallery" in the Azure Portal.
- Click "Create".
- Choose a resource group.
- Enter a name for the gallery and region.
- Click "Review + Create" → "Create".
- Wait for Deployment in progress to finish
- Azure compute gallery created: Now we can create and deploy custom images.
Step 2: Capture an Image of the VM (Specialized State)
Select the Virtual Machine:
- Go to "Virtual Machines" and choose the VM you want to capture.
- Ensure the VM is in a stopped and deallocated state otherwise the VM will automatically stop while in the process of deployment.
Create an Image:
- In the VM overview page, click Capture.
- Choose Capture an image of this VM.
- Under "OS state", select Specialized (since the VM is not generalized).
- Azure Compute Gallery: Choose vmcomputegalleries we created as the target destination.
- 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".
- Note that it inheriting of the properties of the VM created earlier
- Version number: Choose 0.0.1
- End of life: choose any date you prefer
- Define replication regions (optional for redundancy).
- Click "Review + Create" → "Create".
- Notice the VM being stopped as the validation is in progress
- Deployment is complete.
- Then go to resource
Notice we can use a captured image on compute gallery to create a VM and a VMSS (virtual machine scale set)
I wish to further show you something very interesting
- Click on create VM
- Scroll down to image and notice that the one we just created is listed among the availiable images
Conclusion
By completing these steps, you have successfully created an Azure Compute Gallery, captured a specialized VM image, and deployed new VMs from it. This technology allows for effective management and distribution of virtual machine images while keeping user setups and settings.
Top comments (0)