In this article, I will explain how to Create a compute gallery and capture the image Virtual Machine (VM) through the Azure Portal.
What is Azure Compute Gallery:
Azure Compute Gallery is a service that helps you build structure and organization around your Azure resources like pre-configured images and applications. It provides global replication, versioning and grouping of resources for easier management. You can share your resources with everyone or limit sharing to different users, service principals, or AD groups within your organization. Resources can be replicated to multiple regions for quicker scaling of your deployments.
An Azure Compute Gallery provides:
Global replication.
Versioning and grouping of resources for easier management.
Highly available resources with Zone Redundant Storage (ZRS) accounts in regions that support Availability Zones. ZRS offers better resilience against zonal failures.
Premium storage support (Premium_LRS).
Sharing to the community, across subscriptions, and between Active Directory (AD) tenants.
Scaling your deployments with resource replicas in each region. Azure Compute Gallery allows you to specify the number of replicas you want to keep
An Azure Compute Gallery (formerly known as Shared Image Gallery) simplifies sharing resources, like images and application packages, across your organization.
The Azure Compute Gallery lets you share custom VM images and application packages with others in your organization, within or across regions, within a tenant. Choose what you want to share, which regions you want to make them available in, and who you want to share them with. You can create multiple galleries so that you can logically group resources.
Steps On How Azure Compute Gallery is Created.
In this article, I will be capturing an existing image that has a data disk attached to it, as I did in my previous article on Adding a data disk to an existing Windows VM.
Guidelines On How Azure Compute Gallery is Created.
Prerequisite:
1: Azure Subscription from Azure Portal.
2: Resource Group to house your compute gallery resources.
3: Virtual Machine that you intend to create images from.
Once you have all the pre-requisite in place, follow the following guidelines to create your Compute Gallery:
Sign in to the Azure portal.
Type Azure Compute Gallery in the search box and select Azure Compute Gallery in the results.
In the Azure Compute Gallery page, select Create(+).
On the Create Azure Compute Gallery page, select the correct subscription.
In Resource group, select a resource group from the drop-down or select Create new and type a name for the new resource group.
In "Name", type a name for the name of the gallery.
Select a Region from the drop-down.
You can type a short description of the gallery like To store images of VMs.
Click on next to tag the gallery and click on Review & Create
After validation passes, select Create.
When the deployment is finished, select Go to resource.
Capturing a VM in the portal
On the overview page for the VM, on the upper menu, select Capture
The Create an image page appears.
For Resource group, either select Create new and enter a name, or select a resource group to use from the drop-down list. If you want to use an existing gallery, select the resource group for the gallery you want to use.
To create the image in a gallery, select Yes, share it to a gallery as an image version
If you want to delete the source VM after the image has been created, select Automatically delete this virtual machine after creating the image. This is not recommended.
For Gallery details, select the gallery created or create a new gallery by selecting Create new.
In Operating system state select generalized or specialized
Generalized State: Generalizing is a process that removes machine and user-specific information from the VM(For Windows, the Sysprep tool is used)
Specialized State: Specialized VMs haven't been through a process to remove machine-specific information and accounts.
Select an image definition or select Create New and provide a name and information for a new Image definition.
Image definitions are a logical grouping for versions of an image. The image definition holds information about why the image was created and also contains Image metadata such as, what OS it is for, features it supports and other information about using the image. An image definition is like a plan for all of the details around creating a specific image. You don't deploy a VM from an image definition but from the image versions created from the definition.
Enter an image version number. If this is the first version of this image, type 1.0.0
If you want this version to be included when you specify the latest for the image version, then leave Exclude from latest unchecked.
Select an End of life date. This date can be used to track when older images need to be retired.
Under Replication, select a default replica count and then select any additional regions where you would like your image replicated.
When you are done, select Review + create.
After validation passes, select Create to create the image.
Once you click create, the system while creating the VM image will automatically shut down the VM and you will receive a notification to this effect.
The Compute gallery is successfully created.
Conclusion:
This will be the end of our learning on Understanding how to Create a compute gallery and capture the image Virtual Machine (VM) through the Azure Portal Stay tuned for more editions of new informative learning on this Channel.
Kindly Like, subscribe and share for more of this informative learning.