Question 391 of 997
Develop Azure compute solutionsmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is an Azure Files share. This is the correct choice because Azure Container Instances persistent storage volume mounts using Azure Files rely on the SMB 3.0 protocol to attach a fully managed file share from a storage account directly into the container, meaning data written to the /data directory lives on the share, not inside the ephemeral container filesystem, so it survives any restart or reimage of the container group. On the Microsoft Azure Developer Associate AZ-204 exam, this scenario tests your understanding of stateful workloads in serverless containers—a common trap is choosing EmptyDir, which is ephemeral and tied to the pod’s lifetime, making it useless for persistence. Remember the key distinction: Azure Files is for data that must outlive the container, while EmptyDir is for scratch space. A helpful memory tip is “Files for forever, EmptyDir for ephemeral.”

AZ-204 Develop Azure compute solutions Practice Question

This AZ-204 practice question tests your understanding of develop azure compute solutions. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

You are deploying a container group to Azure Container Instances that runs a stateful application. The application writes data to the /data directory. You need to ensure that the data is preserved if the container restarts. Which volume mount type should you use?

Question 1mediummultiple choice
Full question →

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

Azure Files share

Azure Files shares provide persistent, shared storage that can be mounted into Azure Container Instances (ACI) using the SMB 3.0 protocol. This ensures that data written to the /data directory survives container restarts because the share exists independently of the container lifecycle. EmptyDir volumes are ephemeral and tied to the pod's lifetime, making them unsuitable for stateful applications that require data persistence across restarts.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • EmptyDir

    Why it's wrong here

    EmptyDir is ephemeral; its data is lost when the container instance stops or restarts.

  • Azure Files share

    Why this is correct

    An Azure Files share is a durable, managed file share that persists data independently of the container lifecycle.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Secret

    Why it's wrong here

    Secret volumes are used to inject sensitive information (e.g., certificates) into the container, not for general persistent storage.

  • ConfigMap

    Why it's wrong here

    ConfigMap is a Kubernetes resource for storing configuration data and is not directly supported in Azure Container Instances.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse EmptyDir with persistent storage, assuming it survives restarts because it is used in Kubernetes pods, but in ACI, EmptyDir is ephemeral and tied to the container group's lifecycle, not the container's restart policy.

Detailed technical explanation

How to think about this question

Azure Files shares use SMB 3.0 with encryption in transit, requiring port 445 to be open. When mounting an Azure Files share in ACI, you must provide the storage account name and key, and the share is mounted as a read-write volume. A subtle behavior is that Azure Files shares have a maximum file size of 1 TiB per share (or up to 100 TiB with large file shares enabled), and performance can be impacted by network latency, making them less ideal for high-frequency write workloads compared to local ephemeral storage.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A startup's cloud architect reviews their monthly bill and notices costs are higher than expected for a long-running batch job. Switching from on-demand instances to Reserved Instances — or using Spot/Preemptible VMs — can reduce compute costs by up to 72 %. Questions like this test whether you understand the tradeoffs between commitment, flexibility, and cost across cloud pricing models.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related AZ-204 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free AZ-204 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AZ-204 question test?

Develop Azure compute solutions — This question tests Develop Azure compute solutions — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Azure Files share — Azure Files shares provide persistent, shared storage that can be mounted into Azure Container Instances (ACI) using the SMB 3.0 protocol. This ensures that data written to the /data directory survives container restarts because the share exists independently of the container lifecycle. EmptyDir volumes are ephemeral and tied to the pod's lifetime, making them unsuitable for stateful applications that require data persistence across restarts.

What should I do if I get this AZ-204 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more ways this is tested on AZ-204

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. You deploy a container to Azure Container Instances. The container needs to persist data when it restarts. You mount an Azure Files share to a directory inside the container. Which volume type is this?

easy
  • A.emptyDir
  • B.gitRepo
  • C.azureFile
  • D.secret

Why C: Option C is correct because Azure Container Instances supports mounting an Azure Files share as a volume to persist data across container restarts. The `azureFile` volume type references a pre-created Azure storage account and file share, which is mounted into the container's filesystem using SMB 3.0 protocol. This ensures data survives container crashes or restarts, as it is stored externally in Azure Files.

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.