AZ-204 Develop Azure compute solutions Practice Question
You are deploying a containerized application to Azure Container Instances (ACI). The application writes temporary data to a local disk that must persist across container restarts (e.g., after a crash). Which configuration should you use?
⚠ Common exam trap
It's easy for candidates to confuse the temporary disk (which is ephemeral) with persistent storage, or they incorrectly assume Kubernetes concepts like emptyDir apply to ACI, when ACI has its own volume mounting mechanisms (Azure Files, secrets, empty directories).
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
✓
Mount an Azure Files share as a volume in the container group.
Azure Container Instances (ACI) supports mounting an Azure Files share as a persistent volume. When a container restarts (e.g., after a crash), the temporary disk is wiped, but data written to an Azure Files share persists independently of the container's lifecycle. This meets the requirement for data to survive container restarts.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Mount an Azure Files share as a volume in the container group.
Why this is correct
Mounting an Azure Files share as a volume in an Azure Container Instances (ACI) container group is the correct approach for persistent storage. Azure Files provides fully managed file shares that can be accessed via SMB or NFS protocols. When mounted as a volume, data written to the share by the container persists even if the container restarts, the container group is deleted, or a new container group is deployed, ensuring data durability for stateful applications.
- ✗
Use the temporary disk automatically allocated by ACI.
Why it's wrong here
The temporary disk automatically allocated by Azure Container Instances (ACI) is an ephemeral storage solution. This local disk is primarily intended for scratch space, caching, or storing runtime logs that do not require persistence. Any data written to this temporary disk is lost when the container stops, restarts, or the container group is deallocated, making it unsuitable for application data that needs to survive container lifecycle events.
- ✗
Store data in an Azure Cosmos DB database.
Why it's wrong here
Storing data in an Azure Cosmos DB database is a valid solution for persistent data storage, but it is not a direct replacement for a local disk or file system volume. Cosmos DB is a globally distributed, multi-model database service designed for structured and semi-structured data. Using it for file-based persistence would require significant application re-architecture to interact with a database API rather than a file system, introducing additional network latency and complexity for simple file operations.
- ✗
Use an emptyDir volume as available in Kubernetes.
Why it's wrong here
Using an emptyDir volume, as available in Kubernetes, is not directly supported by Azure Container Instances (ACI). emptyDir is a Kubernetes-specific volume type that provides an empty directory for a pod, which is ephemeral and deleted when the pod is removed. ACI is a serverless platform for running individual container groups directly, without the full Kubernetes orchestration layer, and therefore does not natively recognize or support Kubernetes-specific volume constructs like emptyDir.
Go deeper
Related to this question
Learn chapter
Azure Functions Development
Key term
Azure Files Shares
Azure Files Shares are fully managed cloud file shares that you can access from anywhere using standard industry protocols like SMB and NFS.
Key term
Azure Container Instances
Azure Container Instances (ACI) is a PaaS service that lets you run a container directly in Azure without managing any underlying servers or orchestration.
About these practice questions
This AZ-204 question is part of Courseiva's 881-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-204 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-204 exam.