AZ-140 practice question 23 of 35

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?

Full set: 286 questions

Domain Implement an Azure Virtual Desktop infrastructure

Answer options
A: Select Exclude from latest for image version 1.0.0.
B: Select Exclude from latest for image version 1.2.0. Most Voted Correct answer
C: Apply a lock to image version 1.1.0.
D: Apply a tag named default to image version 1.1.0.
Correct Answer:
B. Select Exclude from latest for image version 1.2.0. Most Voted
Explanation

By default, when deploying a virtual machine from an Azure Compute Gallery image definition without specifying a version, Azure uses the version with the highest version number (e.g., 1.2.0). The goal is to make version 1.1.0 the default. The Azure Compute Gallery provides an "Exclude from latest" property for image versions. By setting this property on version 1.2.0, you remove it from consideration when determining the "latest" version. Consequently, version 1.1.0 becomes the highest-numbered version that is not excluded, making it the new default for deployments.

Why Incorrect

A. Excluding version 1.0.0 would have no effect, as 1.2.0 would remain the highest, non-excluded version and thus the default.
C. Applying a resource lock prevents accidental deletion or modification but does not influence the version selection logic for deployments.
D. Tags are key-value pairs used for metadata and organization; they do not control which image version is used as the default.

References

1. Microsoft Learn. (2023). Store and share images in an Azure Compute Gallery.

Reference: In the "Image versions" section

it states

"You can also exclude a specific version from being used as the latest image version by using the Exclude from latest flag." This directly supports the mechanism used in the correct answer.

2. Microsoft Learn. (2023). Create an image definition and an image version.

Reference: In the "Create an image version" section

the parameter exclude-from-latest is described as: "Allows you to exclude this image version from being used as the latest version of the image definition." This confirms that excluding a higher version makes a lower one the "latest".

3. Microsoft Learn. (2023). Azure CLI - az sig image-version create.

Reference: The documentation for the --exclude-from-latest parameter states: "Exclude this image version from being considered as the latest version of the image definition." This shows the specific command-line tool and parameter for implementing the solution.

Scroll to Top