Tutorial / Cram Notes

Azure Compute Gallery is a service that helps you build structure and organization around your custom virtual machine (VM) images. It gives you the ability to:

  • Store and manage multiple versions of an image.
  • Group images into a gallery with similar characteristics.
  • Share images across different Azure subscriptions and regions.
  • Control access with RBAC (Role-Based Access Control).
  • Implement versioning and group images into families for easier management.
  • Provide a highly available storage solution for your images, with replication to multiple regions if needed.

Creating and Sharing an Azure Compute Gallery

To start using the Compute Gallery, you must first create a gallery resource.

  1. Navigate to the Azure portal and search for ‘Compute Galleries’.
  2. Click on “Add” to create a new gallery.
  3. Fill out the gallery details such as the subscription, resource group, gallery name, and region.

After creating the gallery, you can begin adding VM images to it:

  1. Within the created gallery, select “Images” and then “Add.”
  2. Provide details for the image definition, like name, region, OS type, and characteristics (such as whether the image is generalized or specialized).

With this image definition, you can now create image versions that represent the actual VHDs of your VM images:

  1. In the image definition, select “Create new version.”
  2. Upload your VHD or point to an existing managed disk, blob storage, or another image version.
  3. Define the version number as per the strategy that fits your needs.

Once the image version is created, you can share it across accounts and regions. Use Role-Based Access Control to assign permissions to different users or groups to use the image.

Using Azure Compute Gallery Images for VM Deployment

  1. Navigate to the “Virtual Machines” service in the Azure portal.
  2. Click “Add,” then “Virtual machine.”
  3. Under the “Image” section, select “Browse all public and private images,” and then choose the image from your Compute Gallery.
  4. Continue with your VM configuration and then deploy the VM.

Best Practices for Managing Images with Azure Compute Gallery

  • Versioning: Use semantic versioning for your image versions to keep them organized and manageable.
  • Regions: Replicate your image to regions where they’ll be used to reduce latency and improve deployment times.
  • Access control: Utilize RBAC to control which users or services can view or deploy images in the gallery.
  • Lifecycles: Establish lifecycle management policies to automatically remove older image versions and reduce costs.
  • Automate: Integrate image creation and updates into your CI/CD pipeline to automate image lifecycle management.

The Azure Compute Gallery simplifies VM deployments and management of images on a global scale, offering a structured way to distribute VM images across an organization. With its version control, shared access, and replication features, the Azure Compute Gallery provides a robust tool for Azure Administrators, aiding in various scenarios from development/test environments to production workloads.

Practice Test with Explanation

True or False: You can share Azure Compute Gallery images across different Azure regions.

  • True

True

Azure Compute Gallery (formerly known as Shared Image Gallery) allows you to share images globally across different Azure regions.

True or False: Once an image version is created in the Azure Compute Gallery, it cannot be deleted.

  • False

False

Image versions within Azure Compute Gallery can be deleted. However, it’s essential to ensure that no resources are currently using the image version before deleting it.

Which Azure service is used to manage and share custom VM images globally?

  • A) Azure Blob Storage
  • B) Azure VM Image Builder
  • C) Azure Compute Gallery
  • D) Azure Managed Disks

C) Azure Compute Gallery

Azure Compute Gallery is specifically designed for managing and sharing custom VM images globally.

True or False: You need to generalize a VM using Sysprep before creating an image version in Azure Compute Gallery.

  • True

True

Before capturing an image of a VM to create an image version, the VM must be generalized using Sysprep (for Windows) or equivalent for Linux, to remove machine-specific information.

True or False: Shared images in Azure Compute Gallery can be deployed to any subscription within the same Azure Active Directory tenant.

  • True

True

Shared images in Azure Compute Gallery can indeed be deployed to any subscription within the same Azure Active Directory tenant.

Which of the following is required to create an image definition in Azure Compute Gallery? (Select all that apply)

  • A) Offer
  • B) SKU
  • C) Resource Group
  • D) Managed Disk

A) Offer, B) SKU, C) Resource Group

An image definition in Azure Compute Gallery requires an offer, SKU, and the resource group to be specified. A managed disk is not specifically required to create an image definition.

True or False: Images stored in Azure Compute Gallery can be versioned, allowing for staging and rolling out of new configurations.

  • True

True

Azure Compute Gallery allows for versioning of images, supporting the staging and rolling out process for new configurations or updates.

What is the benefit of using the Azure Compute Gallery over locally managed images?

  • A) Increased cost
  • B) Better version control
  • C) Localized access
  • D) Limited sharing capabilities

B) Better version control

Azure Compute Gallery provides better version control and global sharing capabilities compared to locally managed images.

True or False: You can use Azure Image Builder templates to automate image creation in Azure Compute Gallery.

  • True

True

Azure Image Builder can be utilized to automate the creation and customization of images in the Azure Compute Gallery using templates.

Which command-line tool can you use to create and manage images in Azure Compute Gallery?

  • A) PowerShell
  • B) Azure CLI
  • C) Both A and B
  • D) Azure Portal only

C) Both A and B

Both PowerShell and Azure CLI offer commands and tools for creating and managing images in Azure Compute Gallery.

True or False: The images in Azure Compute Gallery can be used to create Azure Kubernetes Service (AKS) node images.

  • False

False

Azure Compute Gallery is intended for managing virtual machine images. Azure Kubernetes Service (AKS) uses its own mechanisms for managing node images.

What is the maximum number of image definitions that can be created within a single image gallery?

  • A) 100
  • B) 1,000
  • C) 10,000
  • D) No limit

B) 1,000

As of the knowledge cutoff date, you’re allowed to create up to 1,000 image definitions within a single image gallery in Azure.

Interview Questions

What is the Azure Compute Gallery?

The Azure Compute Gallery is a collection of pre-configured images and templates that can be used to create virtual machines in Azure.

What kind of images are available in the Azure Compute Gallery?

The Azure Compute Gallery contains a wide range of images, including images for popular operating systems like Windows and Linux, as well as images for popular applications like Microsoft SQL Server.

How can I access the Azure Compute Gallery?

You can access the Azure Compute Gallery through the Azure portal.

Can I filter the images in the Azure Compute Gallery?

Yes, you can filter the images in the Azure Compute Gallery by operating system, application, and publisher.

Can I use a custom image to create a new virtual machine?

Yes, you can create a custom image and use it to create a new virtual machine.

How do I create a custom image for the Azure Compute Gallery?

To create a custom image for the Azure Compute Gallery, you need to create a new virtual machine, configure it to your specifications, install any necessary software, shut it down, and then capture it as an image.

What is the benefit of using pre-configured images from the Azure Compute Gallery?

Using pre-configured images from the Azure Compute Gallery can save time and effort when creating new virtual machines, as the images are already set up with the necessary software and configurations.

Can I edit the settings of an image in the Azure Compute Gallery?

No, you cannot edit the settings of an image in the Azure Compute Gallery. Instead, you should create a custom image with the desired settings.

How do I create a virtual machine using an image from the Azure Compute Gallery?

To create a virtual machine using an image from the Azure Compute Gallery, you need to select the image when creating the virtual machine, and then configure the other settings for the virtual machine.

Can I deploy an image from the Azure Compute Gallery to multiple virtual machines?

Yes, you can deploy an image from the Azure Compute Gallery to multiple virtual machines.

What is the difference between an image and a template in the Azure Compute Gallery?

An image is a pre-configured virtual machine that can be used to create new virtual machines, while a template is a configuration file that can be used to automate the creation of virtual machines.

How can I manage the images in the Azure Compute Gallery?

You can manage the images in the Azure Compute Gallery through the Azure portal.

What is the benefit of creating a custom image for the Azure Compute Gallery?

Creating a custom image for the Azure Compute Gallery can help ensure consistency across your environment, and can make it easier to create new virtual machines with the same configuration.

Can I delete an image from the Azure Compute Gallery?

Yes, you can delete an image from the Azure Compute Gallery.

What should I do if I need to use a software application that is not available in the Azure Compute Gallery?

If you need to use a software application that is not available in the Azure Compute Gallery, you can create a custom image with the necessary software installed.

0 0 votes
Article Rating
Subscribe
Notify of
guest
32 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Fatih Kunter
1 year ago

Great post! Very insightful on how to manage images using the Azure Compute Gallery.

سپهر یاسمی
1 year ago

I appreciate the detailed steps shared here, helped me a lot!

Emma Ross
2 years ago

Is there any way to automate the replication of images across different regions using Azure Compute Gallery?

Ahmet Abacı
1 year ago

How secure is Azure Compute Gallery in terms of data protection?

Alexis Henry
1 year ago

I am having trouble adding a new image version to my gallery. Can anyone help?

Tanja Sekulić
1 year ago

This blog didn’t cover the pricing aspect of Azure Compute Gallery. Any insights?

Jimi Pulkkinen
1 year ago

Nicely written! Could you also share some use cases for utilizing Azure Compute Gallery?

Chatura Rao
10 months ago

Thanks for this informative post!

32
0
Would love your thoughts, please comment.x
()
x