A compute gallery is a repository for storing and managing virtual machine (VM) images. It can be used to store images of pre-configured VMs or to create images from existing VMs in Microsoft Azure.
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 my Windows VM.
Note: By default, VMs don't have Data disks attached to them.
The first thing to do is sign in to the Azure portal. You have to make sure you have an existing subscription.
The first thing to do after creating the VM and running it is to click on "capture", as shown in the diagram below.
Then, in the basics tab, as shown in the diagram below, you click yes to share it to a gallery, as a VM image version will allow the image to be created in a gallery Also, take note that the resource group is the same as the Windows VM I earlier created.
We go to the Gallery details, as shown in the diagram below
Target Azure compute gallery. where I created a new gallery and named it reggie_image_gallery, which is where the VM image I am capturing will be saved.
Operating System State. I selected Specialized VMs because I will not need to input username and password, hostname, etc.
The target VM image definition. is a reference to the image definition that you want to use to create the image, while the image definition specifies the operating system, the source of the image, and other properties of the image.
Version number. This is my first version; hence, I named it 0.0.1.
Select an end-of-life date. The date can be used to track when older images need to be retired.
As shown in the diagram below, I selected a default replica count of 1 meaning I copied it only once, and then selected an additional region of East US where I would like my image replicated.
Replication is the process of copying the VM image to multiple regions. This can be useful for disaster recovery purposes, as it ensures that the image is available even if one region is unavailable.
Then I clicked on Review and Create, as shown in the diagram below.
As you can see in the diagram below, as soon as validation is complete, the original virtual machine stops.
After validation passes, select Create to create the image, and the diagram below will appear.
Another piece of evidence that the Windows virtual machine stops during the deployment of the image captured is shown in the diagram below
Now the deployment is complete
The final product is shown in the diagram below. And as I indicated, you can create another VM from this image or even a VMSS virtual machine scale set from this image.
A Virtual Machine Scale Set (VMSS) in Azure is a set of identical, managed virtual machines (VMs) that are created and managed together. VMSSs are a good choice for applications that need to be highly available and scalable.