When preparing for the AZ-140 Configuring and Operating Microsoft Azure Virtual Desktop exam, understanding Azure Compute Gallery’s establishment and management is key. The Azure Compute Gallery is an Azure service that helps users precisely personalize and fully control their virtual machine (VM) images. Controlling your VM images means you can customize, share, and manage your images readily available for other Azure services as per your requirement.
Concept of Shared Image Gallery
The Shared Image Gallery is a service that allows you to share your images to different users, service principals, or AD groups within and across Azure AD tenants.
One of the key components of the Shared Image Gallery is the shared image version, which represents a view of an image at a specific point in time. Each version contains managed disks associated with them and is assigned a version number, which enables tracking and management.
A Shared Image Gallery consists of:
- Image Source: Azure VM, Managed Image, or VHD
- Image Definition: This contains information like the VM series and types that this Image should be used with, release notes, recommended configurations.
- Image Version: This relates to an instance of an Image Definition. It contains information about the underlying image.
Creating a Shared Image Gallery
To create a Shared Image Gallery, you need to follow these steps:
- Step 1: Go to the Azure portal.
- Step 2: From the home page, click on the “Create a resource” option.
- Step 3: From the New window, search for “Shared Image Gallery.”
- Step 4: In the Shared Image Gallery window, click the “Create” option.
- Step 5: Provide the subscription, name for the Shared Image Gallery, resource group, and location in the Create Shared Image Gallery window.
- Step 6: Click the “Create” button.
After a few moments, the Shared Image Gallery will be created successfully.
Managing Azure Compute Gallery
Managing Azure Compute Gallery involves operations, such as adding images, creating image definitions, and creating image versions.
Adding Images
You can add existing images from your Azure resources to the Shared Image Gallery. For adding a new image, navigate to your Shared Image Gallery and press ‘+ Add new image.’
Creating an Image Definition
Navigate to the Shared Image Gallery -> Image Definitions -> + Add. While creating an Image definition, you need to specify details such as Name, Resource Group, Location, etc.
Creating Image Versions
Once the Image definition is in place, you can create different versions of it. Each version corresponds to a state of an image in a certain point-in-time. Navigate to Image Definitions -> Choose the defined Image -> Image Versions -> + Add.
Replicating and Distributing Images
One of the shared Image Gallery’s strong features is the ability to replicate images across Azure regions. By choosing multiple regions to replicate an image, you ensure availability and boost scalability.
Conclusion
With the Azure Compute Gallery, managing Azure Virtual Machine images becomes a breeze, which is certainly a handy and important skill set for passing your AZ-140 exam! Overall, the Azure Compute Gallery and Shared Image Gallery bring additional control and shareability to your Azure VM images, improving their maintainability and availability.
Remember that for your AZ-140 exam, you need to be comfortable with creating, managing and distributing images in the Shared Image Gallery. Not only will these help you pass your exam, but they’ll also be incredibly useful in real-world scenarios.
Explore the hands-on aspect as much as you can, creating, managing, and distributing various VM images in Azure Compute Gallery. The better you are at manipulating images, the more you’ll understand about Azure’s infrastructure, and the better your preparation for the exam will be.
Practice Test
True or False: Azure Compute Gallery is a repository for managing and sharing images and applications across Azure deployments?
- True
- False
Answer: True
Explanation: Azure Compute Gallery is the service that Microsoft Azure provides for creating, managing, and sharing VM images and applications across Azure deployments.
What is the major function of Azure Compute Gallery?
- A. To manage network traffic
- B. To manage and share VM images and applications
- C. To manage storage accounts
- D. To manage database services
Answer: B. To manage and share VM images and applications
Explanation: Azure Compute Gallery is designed for managing and sharing VM images and application resources across various Azure environments and deployments.
True or False: You can’t create a custom VM image in Azure Compute Gallery.
- True
- False
Answer: False
Explanation: Azure Compute Gallery enables you to create and manage custom VM images and applications.
What is the prerequisite for creating an Azure Compute Gallery?
- A. An active Azure subscription
- B. An active Microsoft 365 subscription
- C. An active Google Cloud subscription
- D. No prerequisite is needed
Answer: A. An active Azure subscription
Explanation: An active Azure subscription is a Prerequisite for creating an Azure Compute Gallery because it is a service provided by Microsoft Azure.
True or False: You cannot customize the VM image using the Azure Compute Gallery.
- True
- False
Answer: False.
Explanation: With the Azure Compute Gallery, you can create and customize VM images according to the needs of your project.
You can share your VM images with?
- A. Specific users within your subscription
- B. All the users within your subscription
- C. Only with Azure administrators
- D. Both A & B
Answer: D. Both A & B
Explanation: Azure Compute Gallery allows you to share your VM images either with specific users within your subscription or with all users within your subscription.
Azure Compute Gallery images are stored in?
- A. Blob Storage
- B. Managed disks
- C. Azure File Storage
- D. Azure Data Lake Storage
Answer: B. Managed Disks
Explanation: Azure Compute Gallery images are stored as managed disks, which gives them high durability, availability, and scalability.
Can you deploy machines from the shared image gallery to any region?
- A. Yes
- B. No
- C. Only to the region where the image was created
- D. Only to the region where the subscription is held
Answer: A. Yes
Explanation: Machines can be deployed from the shared image gallery to any region, providing flexibility and global access.
Which protocol does Azure Compute Gallery use to manage VM images?
- A. HTTP
- B. HTTPS
- C. SSH
- D. FTP
Answer: B. HTTPS
Explanation: Azure Compute Gallery uses secure HTTPS protocols to manage VM images securely.
True or False: You cannot control access to shared images in Azure Compute Gallery.
- True
- False
Answer: False
Explanation: Access to shared images in the Azure Compute Gallery can be controlled using built-in Azure role-based access control (RBAC).
True or False: Azure Compute Gallery supports versioning of images.
- True
- False
Answer: True
Explanation: Azure Compute Gallery supports versioning of images. This allows for better management and rollback in case of any issues with the latest version.
The Azure Compute Gallery allows you to replicate images to:
- A. Multiple Azure regions
- B. Only one Azure region
- C. Only to the region where the image was created
- D. Only to the region where the subscription is held
Answer: A. Multiple Azure regions
Explanation: The Azure Compute Gallery allows you to distribute (replicate) your virtual machine images to multiple Azure regions
Interview Questions
What is Azure Compute Gallery?
Azure Compute Gallery is a service that allows you to share VM images within and across Azure Active Directory tenants. It enables you to manage and distribute virtual machine images inside or outside of your organization.
How would you add an image version to Azure Compute Gallery?
To add an image version in Azure Compute Gallery, you need to go to Azure portal. Open the shared image gallery, and select the image definition to which you’d like to add an image version. Click on “Add version”, then fill in the details and click “Create”.
Can you add image versions from different regions to the Azure Compute Gallery?
Yes, Azure Compute Gallery supports adding image versions from different regions. You can replicate your images across Azure regions for better flexibility and scalability.
What is the maximum number of image versions that can be stored within one image definition in the Azure Compute Gallery?
You can store up to 1,000 image versions in one image definition in the Azure Compute Gallery.
How can you manage the replication of images across regions in the Azure Compute Gallery?
You can manage the replication of images across regions through the ‘Replication’ settings when you create or update an image version in the Compute Gallery. You can choose the regions to which you want to replicate the image.
How is the pricing for Azure Compute Gallery determined?
Pricing for Azure Compute Gallery depends on the storage and outbound data transfer costs involved. Each image version stored in the gallery uses Managed Disk storage based on the disk type, size, and the number of replicas across regions.
Can you update an existing VM from an updated image version in Azure Compute Gallery?
No, updating an existing VM directly from an updated image in the Compute Gallery isn’t supported. You need to create a new VM from the updated image version.
What are the two roles available for Shared Image Gallery?
The two roles available for Shared Image Gallery are ‘Reader’ and ‘Contributor’. The Reader can view shared images and use VM images to create VMs, and the Contributor can manage images and versions, in addition to the Reader’s privileges.
Is it possible to apply Azure Policy on Azure Compute Gallery?
Yes, Azure Policy can be applied at different scopes on Azure Compute Gallery, including management group, subscription, and resource group level. Azure Policy helps in governing your resources and ensuring compliance with corporate standards.
How do you ensure the latest version of an image is used while creating a VM in Azure Compute Gallery?
When creating a VM, specify the image version as ‘latest’. This ensures that Azure uses the latest image version from the specified image definition.
What are the benefits of using Shared Image Gallery in Azure?
Shared Image Gallery allows you to share your images to different users, service principals, or across different Azure Active Directory tenants thereby improving your organization’s deployment speed. Also, it allows versioning and grouping of images for better organization and control.
How can you delete an image version from Azure Compute Gallery?
To delete an image version from Azure Compute Gallery, navigate to the image version that you want to delete, select it, and click on ‘Delete’. After confirming the action, the image version will be removed.
Can you create snapshots of VMs directly from Azure Compute Gallery?
No, Azure Compute Gallery does not support the creation of snapshots. It supports the creation and management of VM images.
Do you need to stop a VM before you can create an image of it in Azure Compute Gallery?
Yes, it is recommended to stop the VM before creating an image of it to ensure data integrity.
Can you share Azure Compute Gallery images with other Azure subscriptions?
Yes, Azure Compute Gallery allows you to share images either within a single subscription or across multiple subscriptions.