Azure Compute Gallery Default Image Version Configuration

AZ-140 By islever Editorial Last updated

Short answer

B Select Exclude from latest for image version 1.2.0 to shift the default image selection to version 1.1.0.

Question

You have an Azure Virtual Desktop deployment that contains an Azure compute gallery. The Azure compute gallery contains an image definition named
Definitions Definitionl contains the following image versions:
  • 1.0.0
  • 1.1.0
  • 1.2.0
You need to ensure that when a virtual machine is created from the Azure compute gallery, the 1.1.0 image version is used by default.
What should you do?
  1. Select Exclude from latest for image version 1.0.0.
  2. Select Exclude from latest for image version 1.2.0. Correct Answer
  3. Apply a lock to image version 1.1.0.
  4. Apply a tag named default to image version 1.1.0.

Key Takeaways

The trap is assuming you can force a version via tags or locks; the actual mechanism relies on manipulating the 'Exclude from latest' flag to change which version holds the 'latest' status.

Learn how to set a specific Azure Compute Gallery image version as the default by using the Exclude from latest feature to manage version precedence.

Common mistake: Users often choose Option D, believing that tagging an image as 'default' works like other cloud services. However, Azure Compute Gallery ignores custom tags for version selection and strictly uses the 'Exclude from latest' setting combined with version numbers.

Expert Analysis

The core concept here is how Azure Compute Gallery (formerly Shared Image Galleries) determines the default image version when a virtual machine is provisioned. By design, if no specific version is requested, the platform selects the highest available version marked as 'latest'. In this scenario, versions 1.0.0, 1.1.0, and 1.2.0 exist. To make 1.1.0 the default, we must manipulate the 'latest' designation.

Option B is correct because selecting 'Exclude from latest' for version 1.2.0 removes it from the set of images considered for the 'latest' label. Once 1.2.0 is excluded, the next highest version, 1.1.0, automatically becomes the new 'latest' image. This ensures that any VM creation request without an explicit version specifier will pick 1.1.0. Comments supporting Option B correctly identify that excluding the current highest version shifts the default to the next available one.

Option A is incorrect because excluding 1.0.0 leaves 1.2.0 as the highest version, so 1.2.0 would remain the default. Option C is incorrect because resource locks prevent modification or deletion but do not influence version selection logic. Option D is incorrect; while tags are useful for organization, Azure Compute Gallery does not use a tag named 'default' to determine the automatic fallback version for VM creation. The determination is strictly based on the 'Exclude from latest' flag and version hierarchy.

Official Reference

https://learn.microsoft.com/en-us/azure/virtual-machines/shared-image-galleries

This link opens the official vendor documentation in a new tab.

Exam Strategy

When dealing with Azure Compute Gallery questions, always check the 'Exclude from latest' property first. Remember that 'latest' is a dynamic label assigned to the highest version unless explicitly excluded. If the question asks to make a non-highest version the default, exclude all higher versions. Do not assume tags or locks affect provisioning defaults.

Frequently Asked Questions

What happens if I exclude all image versions from latest?

If all versions are excluded from latest, the 'latest' label is removed entirely. VM creation requests without a specific version will fail or require an explicit version choice.

Can I use tags to override the default image version?

No. Tags are metadata for organization and billing. Azure Compute Gallery uses the 'Exclude from latest' flag and version number hierarchy to determine the default image.

More AZ-140 FAQ →

Community Votes

B
86%
D
14%

86% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 7 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 7

  1. Doornroosje 👍 4
    Got this question on exam today.
  2. Guglielmino 👍 3 Answered D
    From Gemini: Azure Virtual Desktop uses the latest image version by default when creating a virtual machine from an Azure compute gallery. To override this behavior and use a specific image version, you need to apply a tag named "default" to that image version. Option B would prevent the 1.2.0 image version from being used as the default, but it wouldn't make the 1.1.0 image version the default.
  3. Magis 👍 3 Answered B
    Correct. Exclude from latest. You can keep a version from being used as the latest image version. https://learn.microsoft.com/en-us/azure/virtual-machines/shared-image-galleries?tabs=azure-cli
  4. jeff1988 👍 2 Answered B
    B. Select Exclude from latest for image version 1.2.0. By excluding the latest image version (1.2.0), the next available version (1.1.0) will be used as the default. This approach ensures that the desired image version is selected without needing additional configurations or tags.
  5. MJFT 👍 2 Answered B
    11. If you want this version to be included when you specify latest for the image version, then leave Exclude from latest unchecked. https://learn.microsoft.com/en-us/azure/virtual-machines/capture-image-portal
Show 2 more comments
  1. Lewis_Ibbitson 👍 1 Answered B
    B. Select Exclude from latest for image version 1.2.0.
  2. Moria 👍 1 Answered B
    correct

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All AZ-140 Questions

Access 64 questions with complete answers and detailed explanations.

View Full AZ-140 Practice Test →

← Back to AZ-140 Study Guide