AZ-104 Deploy and Manage Azure Compute Practice Question
A release team needs to deploy the same hardened Windows image to VMs in three regions. They must keep approved versions, replicate images to each region, and be able to roll back to an earlier approved version without uploading a new VHD. What should they use as the image source?
⚠ Common exam trap
Watch out — candidates often confuse managed disk snapshots with images, not realizing that snapshots lack the versioning, replication, and deployment flexibility that Azure Compute Gallery provides for multi-region scenarios.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
An Azure Compute Gallery image definition with image versions
Azure Compute Gallery (formerly Shared Image Gallery) allows you to store multiple versions of a custom image definition, replicate them across regions, and manage rollbacks by simply changing which image version is referenced during deployment. This meets all requirements: hardened Windows image, multi-region replication, version control, and rollback without uploading a new VHD.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
A managed disk snapshot captured from one reference VM
Why it's wrong here
A managed disk snapshot is a point-in-time, read-only copy of a managed disk's state, typically used for backup or as a source to create a new managed disk. It captures the exact OS and data of one specific VM at one moment, but it does not have the versioning, replication, or sharing capabilities of an Azure Compute Gallery; you cannot replicate snapshots across regions as a single inherently managed image artifact, nor can you easily maintain multiple versions with rollback semantics in a gallery.
When this WOULD be correct
When deploying a single VM in the same region from a point-in-time backup, and rollback is not required. For example, creating a test VM from a snapshot of a production VM for troubleshooting.
- ✓
An Azure Compute Gallery image definition with image versions
Why this is correct
An Azure Compute Gallery (formerly Shared Image Gallery) image definition acts as a schema for the OS, state, and regional replication settings, while image versions are immutable, versioned snapshots of that schema. This combination supports controlled rollout via replication to multiple regions, rolling back to a previous image version, and enforcing consistent hardened configurations across VM deployments, which is exactly what a release team needs for managed OS lifecycle management.
- ✗
A single unmanaged VHD stored in a storage account
Why it's wrong here
A single unmanaged VHD in a storage account is a page blob-based virtual hard disk that is not managed by Azure's managed disk service, so it lacks built-in availability, encryption-at-rest integration, and lifecycle controls. It is a single artifact with no native replication or versioning across regions; you would need to manually copy VHDs and manage access, and the lack of an image definition and versioning makes it unsuitable for governed, repeatable, hardened OS releases across a fleet.
When this WOULD be correct
If the question required a simple, cost-effective solution for deploying a single VM in one region without versioning or rollback capabilities, and the team could manually manage VHD copies, then using an unmanaged VHD in a storage account would be acceptable.
- ✗
A custom script extension that installs the operating system settings after deployment
Why it's wrong here
A custom script extension (CSE) is an agent-based post-deployment mechanism that executes PowerShell or Bash scripts after a VM is provisioned. It can install applications, apply security baselines, or join a domain, but it does not create or manage the underlying OS image itself, so it is not a source image for the VM's disk; every VM still must be built from some base image, and the script runs only after that base image is deployed, introducing drift if the base image changes.
When this WOULD be correct
When the question requires applying post-deployment configurations (e.g., installing software, setting registry keys) to an existing VM without modifying the base image, and versioning/rollback of the image itself is not needed.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.
✓An Azure Compute Gallery image definition with image versionsCorrect answer▾
Why this is correct
An Azure Compute Gallery (formerly Shared Image Gallery) image definition acts as a schema for the OS, state, and regional replication settings, while image versions are immutable, versioned snapshots of that schema. This combination supports controlled rollout via replication to multiple regions, rolling back to a previous image version, and enforcing consistent hardened configurations across VM deployments, which is exactly what a release team needs for managed OS lifecycle management.
✗A managed disk snapshot captured from one reference VMWrong answer — click to see why▾
Why this is wrong here
A managed disk snapshot is tied to a single region and cannot be replicated across multiple regions. It also does not support versioning or rollback to earlier approved versions without uploading a new VHD.
★ When this WOULD be the correct answer
When deploying a single VM in the same region from a point-in-time backup, and rollback is not required. For example, creating a test VM from a snapshot of a production VM for troubleshooting.
Why candidates choose this
Candidates may think snapshots provide a reusable image source, but they lack multi-region replication and version management capabilities needed for this scenario.
✗A single unmanaged VHD stored in a storage accountWrong answer — click to see why▾
Why this is wrong here
A single unmanaged VHD stored in a storage account cannot be versioned or replicated across regions, and rolling back to an earlier version would require uploading a new VHD, failing the requirement to keep approved versions and enable rollback without re-uploading.
★ When this WOULD be the correct answer
If the question required a simple, cost-effective solution for deploying a single VM in one region without versioning or rollback capabilities, and the team could manually manage VHD copies, then using an unmanaged VHD in a storage account would be acceptable.
Why candidates choose this
Candidates may think a VHD is a straightforward image source and overlook the need for versioning, replication, and rollback features that Azure Compute Gallery provides.
✗A custom script extension that installs the operating system settings after deploymentWrong answer — click to see why▾
Why this is wrong here
A custom script extension installs OS settings after deployment but does not provide a hardened Windows image source, versioning, or rollback capability without uploading a new VHD.
★ When this WOULD be the correct answer
When the question requires applying post-deployment configurations (e.g., installing software, setting registry keys) to an existing VM without modifying the base image, and versioning/rollback of the image itself is not needed.
Why candidates choose this
Candidates may think custom script extensions can automate OS hardening, but they confuse configuration management with image management, overlooking the need for image versioning and regional replication.
Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Go deeper
Related to this question
Learn chapter
Managed Identities for Azure Resources
Key term
Region
A region is a distinct geographic location where a cloud provider operates multiple data centers that are connected by low-latency networks and provide cloud services.
Key term
Replication
Replication is the process of copying and synchronizing data across multiple servers or storage devices to ensure availability, reliability, and fault tolerance.
About these practice questions
Courseiva writes every AZ-104 question from scratch — 1,049 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-104 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-104 exam.