easymultiple choiceObjective-mapped

You need to deploy a new Ubuntu VM that automatically creates an app user and installs packages the first time it boots. Which approach should you use?

Question 1easymultiple choice
Full question →

You need to deploy a new Ubuntu VM that automatically creates an app user and installs packages the first time it boots. Which approach should you use?

Answer choices

Why each option matters

Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.

A

Distractor review

Use an availability set so the VM runs the initialization tasks during host placement.

Availability sets improve resilience, but they do not run first-boot configuration commands or install software.

B

Best answer

Use cloud-init in the VM creation settings to perform first-boot configuration.

Cloud-init is the standard Linux initialization method for automating first boot tasks. It can create users, install packages, write files, and run commands as the VM starts. This makes it a good fit when you want the operating system to configure itself without needing to sign in afterward or run a separate manual script.

C

Distractor review

Use an Azure Policy assignment to install the packages after deployment.

Azure Policy can enforce configuration standards, but it is not a first-boot installer for a Linux VM.

D

Distractor review

Use a managed disk snapshot and attach it to the VM after deployment.

Snapshots create disk copies, but they do not automate initial OS customization or package installation.

Common exam trap

Common exam trap: answer the scenario, not the keyword

Many certification questions include familiar terms but test a specific constraint. Read the exact wording before choosing an answer that is generally true but wrong for this case.

Technical deep dive

How to think about this question

This question should be treated as a scenario, not a definition check. Identify the problem, the constraint and the best action. Then compare each option against those facts.

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.
  • Use explanations to understand the rule behind the answer.

TExam Day Tips

  • Underline the problem statement mentally.
  • 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.

Related practice questions

Related AZ-104 practice-question pages

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

More questions from this exam

Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.

FAQ

Questions learners often ask

What does this AZ-104 question test?

Read the scenario before looking for a memorised answer.

What is the correct answer to this question?

The correct answer is: Use cloud-init in the VM creation settings to perform first-boot configuration. — Cloud-init is the correct choice because it is designed for Linux VM initialization at first boot. In Azure, you can pass a cloud-init script during deployment to create local users, install packages, configure SSH settings, and prepare the VM automatically. This is simpler and more reliable than manual post-deployment steps, especially when you want repeatable builds for new Linux machines. Why others are wrong: An availability set helps with uptime, not configuration. Azure Policy enforces compliance, but it does not act as an operating-system provisioning tool. A disk snapshot is only a copy of a disk state; it cannot create users or install software on a fresh VM. The best answer is the feature meant for boot-time guest customization.

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

Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.

Discussion

Loading comments…

Sign in to join the discussion.