Skip to content

5 Free AZ-104 Compute Practice Questions

Practise AZ-104 compute with original scenario-based questions from the Pass104 question bank, where every choice looks plausible until you weigh the constraints, with explanations for every choice. Every answer includes a worked explanation and Microsoft Learn sources. No account required.

Start with question 1
Work through the set

Four choices per question. Think through your answer, then open the explanation to check it.

5 questions · compute · no timer

What these questions cover

These samples cover selected compute skills in the Microsoft AZ-104 study guide. They are not a complete domain assessment.

Read each scenario, choose an answer, then open the explanation. All questions and answers are free on this page. In the app, the free plan gives you one 6-question exam a day across all domains; domain-targeted practice is a Pro feature.

Question 1 of 5Managed disk types

You plan to deploy VM1 to availability zone 1 in West Europe. The chosen VM size supports premium storage, Premium SSD v2 and Ultra Disk, and its own IOPS cap is well above 50,000. VM1 needs an OS disk that offers the highest IOPS available to an OS disk, and a single data disk that sustains at least 50,000 IOPS without striping. Which disk configuration meets the requirements at the lowest cost?

  1. OS disk: Premium SSD v2; data disk: Premium SSD v2
  2. OS disk: Premium SSD; data disk: Premium SSD v2
  3. OS disk: Premium SSD; data disk: Ultra Disk
  4. OS disk: Premium SSD; data disk: Premium SSD
Show answer and explanation

Correct answer: B · OS disk: Premium SSD; data disk: Premium SSD v2

Premium SSD v2 and Ultra Disk cannot be used as OS disks, so Premium SSD (up to 20,000 IOPS) is the highest-performing OS disk type. For the data disk, Premium SSD v2 can be provisioned up to 80,000 IOPS, and its performance is set independently of size. It is generally cheaper than Ultra Disk for the same performance. It is also deployed as a zonal disk, which suits a VM in availability zone 1.

Why the other choices do not fit

  • A. Premium SSD v2 is not supported as an OS disk, so this configuration cannot be deployed, even though the data disk would meet the IOPS target.
  • C. Ultra Disk meets the 50,000 IOPS requirement, but it costs more than a Premium SSD v2 provisioned for the same IOPS. It also needs Ultra Disk compatibility enabled on the VM. That fails the lowest-cost requirement.
  • D. The largest Premium SSD tiers provide 20,000 provisioned IOPS, and bursting only reaches 30,000. A single Premium SSD data disk cannot sustain 50,000 IOPS.
Question 2 of 5Scale set scale-in policy

VMSS1 is a zone-spanning scale set in Uniform orchestration mode, deployed across availability zones 1, 2 and 3 with the default scale-in policy. Zone 1 hosts instances 0, 2, 5 and 7; zone 2 hosts instances 1, 4 and 9; zone 3 hosts instances 3, 6 and 8. Within each zone, instances are evenly spread across fault domains, and no instance has scale-in protection. Each instance keeps user session state locally. Autoscale is about to remove one instance. You must drain session state from the instance that will be deleted, draining as few instances as possible. Which instance should you drain?

  1. Instance 9
  2. Instance 8
  3. Instance 0
  4. Instance 7
Show answer and explanation

Correct answer: D · Instance 7

The default scale-in policy first balances the scale set across availability zones. Zone 1 has four instances and the other zones have three, so the deletion comes from zone 1. Fault domains inside the zone are already balanced. Among 0, 2, 5 and 7, the policy then deletes the highest instance ID: 7.

Why the other choices do not fit

  • A. Instance 9 has the highest ID in the scale set, but zone balancing comes first. Zone 2 already has three instances, so nothing is removed from it.
  • B. Instance 8 is the highest ID in zone 3. Zone 3 is also balanced at three instances and is not chosen for this scale-in.
  • C. Instance 0 would be chosen by the OldestVM policy inside zone 1. The default policy removes the highest instance ID, not the oldest.
Question 3 of 5App Service plan scaling

A production web app runs in an App Service plan in the Standard S1 tier, and every pricing tier is available to the plan in its region. Traffic is unpredictable. The operations team wants the platform, rather than rules they write, to make scale-out decisions from incoming HTTP traffic, with prewarmed instances absorbing sudden spikes. The solution must minimize administrative effort. What should you do?

  1. Configure a rule-based autoscale setting on the existing plan
  2. Enable automatic scaling on the existing plan
  3. Scale up the plan to Premium V3 and enable automatic scaling
  4. Scale up the plan to Isolated V2 and enable automatic scaling
Show answer and explanation

Correct answer: C · Scale up the plan to Premium V3 and enable automatic scaling

Automatic scaling is a platform-managed scale-out option driven by HTTP traffic. It provides always-ready and prewarmed instances, and you do not write any rules. It is available only on Premium v2, v3 and v4 plans. Scaling the plan up to Premium V3 is therefore the prerequisite, and enabling automatic scaling then meets every requirement.

Why the other choices do not fit

  • A. Standard supports rule-based autoscale, but the team must write and maintain the rules, and it has no prewarmed instances. That fails both the platform-decided and minimal-effort requirements.
  • B. Automatic scaling is not available in the Standard tier. The option cannot be enabled until the plan runs on Premium v2, v3 or v4.
  • D. Isolated V2 supports manual scaling and rule-based autoscale, but automatic scaling is limited to Premium v2 to v4. It is also far more expensive than required.
Question 4 of 5Container Instances updates

CG5 is an Azure Container Instances container group in West Europe with a single Linux container, app1, deployed with 2 vCPU and 4 GB of memory. During peak processing app1 now fails with out-of-memory errors. You need app1 to be able to use 8 GB of memory, and the solution must minimize administrative effort. What should you do?

  1. Delete CG5, and then redeploy it with app1 allocated 8 GB of memory
  2. Without deleting CG5, run az container create with the same container group name and a memory value of 8 GB
  3. Stop CG5, change its memory allocation, and then start CG5
  4. Move the workload to a new Azure Kubernetes Service cluster and give the pod an 8 GB memory limit
Show answer and explanation

Correct answer: A · Delete CG5, and then redeploy it with app1 allocated 8 GB of memory

You update a running container group by redeploying it under the same name, but only some properties support that update. CPU, memory and GPU resources are on the list that requires deleting the group first. Deleting CG5 and recreating it with 8 GB is the smallest change that works. The group gets a fresh deployment, so its IP address may change; clients should use a DNS name label.

Why the other choices do not fit

  • B. A same-name redeploy updates properties such as the image, environment variables or DNS name label. A change to memory is rejected unless the group is deleted first.
  • C. A stopped group is in the Terminated state and cannot be updated in place. Stopping it does not make the memory allocation editable.
  • D. AKS could run the container with more memory, but building and operating a cluster is far more administrative effort than recreating one container group.
Question 5 of 5ARM template secure parameters

A security review finds that an ARM template in a shared Git repository defines a parameter named adminPassword of type string, with a defaultValue set to a working password. The template deploys virtual machines, and the VM resource passes adminPassword to the osProfile adminPassword property, which expects a string. After you remediate it, the password must not be stored in the repository, and future deployments must not expose it through deployment history. What should you change in the template?

  1. Change the parameter type to secureString and keep the defaultValue
  2. Change the parameter type to secureString and remove the defaultValue
  3. Change the parameter type to secureObject and remove the defaultValue
  4. Move the password from the parameter to the variables section
Show answer and explanation

Correct answer: B · Change the parameter type to secureString and remove the defaultValue

Parameters of type secureString cannot be read after deployment, so the value is not exposed in deployment history. Removing the defaultValue takes the secret out of the template file in the repository. The password is then supplied at deployment time, for example from Key Vault through a parameter file reference. Also rotate the exposed password, because it remains in the Git history.

Why the other choices do not fit

  • A. The secure type hides the value from deployment history, but the working password remains in the template file for anyone with repository access. Microsoft recommends no default values for secure parameters.
  • C. secureObject protects sensitive JSON objects. The osProfile property expects a string, so an object parameter does not fit this password.
  • D. Variables are written into the template itself, so the password would stay in the repository. Variables are also not protected like secure parameters.

These original practice questions are adapted from the Pass104 question bank. They are not actual Microsoft exam questions and do not reproduce or predict exam difficulty or results. The selected answers and explanations include linked Microsoft Learn documentation. The public samples were last reviewed on 26 September 2026. Azure services and exam objectives can change, so use the references for the latest details. Pass104 is independent of Microsoft.