AZ-104 Deploy and Manage Azure Compute Practice Question
A build agent VM is recreated from image every night. The OS can be lost on reimage, but build caches and artifacts must persist across rebuilds. The team also wants the cheapest OS storage option that supports this pattern. Which two choices should you make? Select two.
⚠ Common exam trap
Many candidates confuse the temporary resource disk (which is also ephemeral) with a managed data disk, or assume that Premium SSD or availability sets provide persistence, when in fact only a separate managed data disk ensures data survives OS reimaging.
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
✓
Use an ephemeral OS disk.
An ephemeral OS disk uses the local VM storage or temp SSD, which is destroyed when the VM is deallocated or reimaged. This matches the requirement that the OS can be lost on reimage. Option B is correct because placing build caches and artifacts on a separate managed data disk ensures they persist independently of the OS disk lifecycle; data disks are not affected by OS reimaging and can be reattached to the new VM instance.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use an ephemeral OS disk.
Why this is correct
An ephemeral OS disk is the cheapest OS storage choice for a VM that can be recreated from image often. It is acceptable here because the scenario explicitly says the OS can be lost on reimage.
- ✓
Place build caches and artifacts on a separate managed data disk.
Why this is correct
A separate managed data disk is the correct choice because it is independent of the build agent VM's lifecycle. When the VM is reimaged or recreated nightly, the data disk remains attached and retains its contents, while the ephemeral OS disk is discarded. Managed data disks are durable, persistent storage that can also be snapshotted or backed up, but here the key benefit is that caches and artifacts survive across rebuilds without being lost.
- ✗
Use a Premium SSD OS disk so the reimage is preserved.
Why it's wrong here
Selecting a Premium SSD OS disk does not preserve the OS disk across a reimage; the reimage operation always resets the OS disk to the original image state, regardless of whether it uses Standard or Premium storage. Premium SSD only offers higher IOPS and throughput, which are unnecessary for a build agent that explicitly tolerates losing the OS. Additionally, paying premium costs for a disk that is discarded every night is wasteful, making an ephemeral OS disk the cheaper and equally functional alternative.
When this WOULD be correct
In a scenario where the VM must retain OS disk data across redeployments (e.g., custom software installed on the OS disk must survive), and cost is not the primary constraint, a Premium SSD OS disk would be correct.
- ✗
Store the caches only on the temporary resource disk.
Why it's wrong here
The temporary resource disk is a host-local SSD intended for scratch space, not durable storage. It is cleared when the VM is reimaged, deallocated, migrated, or when service healing occurs, so data placed there disappears exactly when the build agent is rebuilt. Because the scenario requires caches and artifacts to persist across nightly reimages, the temporary disk is completely unsuitable—this is a textbook case for a managed data disk instead.
When this WOULD be correct
If the question required storing temporary build files that do not need to persist across rebuilds, and the goal was to minimize cost by using the free temporary disk, then storing caches there would be correct.
- ✗
Use an availability set to make the OS disk persistent.
Why it's wrong here
An availability set is a logical grouping that spreads VMs across fault and update domains to improve resilience against hardware failures and patching windows. It has no effect on disk persistence: the OS disk of any VM in the set is still reset during a reimage, and durability is determined solely by the disk type, not by the availability feature. Using an availability set would be useful for managing multiple build agents, but it does not make a single OS disk persistent.
When this WOULD be correct
In a scenario where you need to ensure high availability for a VM running a critical application, and you want to guarantee that at least one instance remains running during planned or unplanned downtime, you would use an availability set.
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.
✓Use an ephemeral OS disk.Correct answer▾
Why this is correct
An ephemeral OS disk is the cheapest OS storage choice for a VM that can be recreated from image often. It is acceptable here because the scenario explicitly says the OS can be lost on reimage.
✗Use a Premium SSD OS disk so the reimage is preserved.Wrong answer — click to see why▾
Why this is wrong here
Premium SSD OS disks persist data across VM recreations, but the question requires the cheapest OS storage option that supports nightly reimaging. Ephemeral OS disks are free and discard OS changes on deallocation, meeting the cost and reimage pattern requirements.
★ When this WOULD be the correct answer
In a scenario where the VM must retain OS disk data across redeployments (e.g., custom software installed on the OS disk must survive), and cost is not the primary constraint, a Premium SSD OS disk would be correct.
Why candidates choose this
Candidates may assume Premium SSD is always better for performance and persistence, overlooking the specific requirement for cheap, disposable OS storage and the need to separate persistent data onto a data disk.
✗Store the caches only on the temporary resource disk.Wrong answer — click to see why▾
Why this is wrong here
The temporary resource disk is not persistent; its contents are lost when the VM is reimaged or redeployed, so build caches and artifacts would not survive nightly rebuilds.
★ When this WOULD be the correct answer
If the question required storing temporary build files that do not need to persist across rebuilds, and the goal was to minimize cost by using the free temporary disk, then storing caches there would be correct.
Why candidates choose this
Candidates may confuse the temporary resource disk with a persistent data disk, or assume that because it is local and fast, it is suitable for persistent storage, overlooking its non-persistent nature.
✗Use an availability set to make the OS disk persistent.Wrong answer — click to see why▾
Why this is wrong here
An availability set ensures VM availability during maintenance or failures, but does not make the OS disk persistent. The OS disk is still subject to reimaging, so caches and artifacts would be lost.
★ When this WOULD be the correct answer
In a scenario where you need to ensure high availability for a VM running a critical application, and you want to guarantee that at least one instance remains running during planned or unplanned downtime, you would use an availability set.
Why candidates choose this
Candidates may confuse availability sets with disk persistence, thinking that grouping VMs in an availability set somehow protects the OS disk from being reimaged or deleted.
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
About these practice questions
This AZ-104 question is part of Courseiva's 1,049-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.