Azure Administrator Domain 3: Deploy and Manage Azure Compute Resources
48 free practice questions for Deploy and Manage Azure Compute Resources in the Microsoft Azure Administrator Associate (AZ-104) exam. Try each question first, then open "Show answer" for the correct option and explanation.
Deploy and Manage Azure Compute Resources practice questions
-
Question 1. You deploy the same ARM template repeatedly. Which deployment mode deletes resources in the group that are not in the template?
Show answer
Answer: C. Complete mode
Complete mode removes resources not defined in the template; incremental mode leaves them.
-
Question 2. Which is the default ARM template deployment mode?
Show answer
Answer: A. Incremental
Incremental mode adds or updates resources and leaves unlisted resources unchanged.
-
Question 3. What does the what-if operation show before an ARM or Bicep deployment?
Show answer
Answer: D. The changes the deployment would make to existing resources
What-if previews creates, modifies, and deletes without applying them.
-
Question 4. In an ARM template, which section holds values supplied at deployment time, such as a VM size?
Show answer
Answer: D. parameters
Parameters accept input values; variables hold values computed inside the template.
-
Question 5. In an ARM template, what is the outputs section used for?
Show answer
Answer: D. Returning values, such as an IP address, after deployment
Outputs return values from the deployment that can be used by scripts or other templates.
-
Question 6. How should a template securely receive an admin password without storing it in the parameter file?
Show answer
Answer: A. Reference a Key Vault secret in the parameter file
Parameter files can reference secrets in Key Vault that has template deployment access enabled.
-
Question 7. Which command converts an existing ARM JSON template into Bicep?
Show answer
Answer: D. az bicep decompile
decompile converts JSON to Bicep; build compiles Bicep to ARM JSON.
-
Question 8. Which Azure CLI command deploys a Bicep file to a resource group?
Show answer
Answer: C. az deployment group create --template-file main.bicep
The deployment group create command accepts Bicep files directly.
-
Question 9. How can you export a template for resources you already deployed through the portal?
Show answer
Answer: B. Use Export template on the resource group
Export template generates an ARM template from existing resources or a deployment.
-
Question 10. You need to change a running VM to a larger size. What might happen?
Show answer
Answer: B. The VM may restart, and a deallocation may be needed if the size is unavailable
Resizing restarts the VM; if the cluster lacks the size, you must deallocate first.
-
Question 11. Which option protects VMs from a datacenter failure within a region?
Show answer
Answer: B. Deploy VMs across availability zones
Zones are separate datacenters; availability sets only protect within a datacenter.
-
Question 12. What is the SLA benefit of deploying two or more VMs across availability zones in the same region?
Show answer
Answer: D. The highest VM uptime SLA, at 99.99%
Two or more instances across zones get Microsoft's highest VM connectivity SLA.
-
Question 13. Can you add an existing VM to an availability set?
Show answer
Answer: D. No, the VM must be recreated in the availability set
Availability set membership is set at creation; you'd need to recreate the VM.
-
Question 14. What does a VM scale set autoscale rule based on CPU do?
Show answer
Answer: A. Adds or removes instances when CPU crosses thresholds
Scale sets scale out and in by changing instance count based on metrics or schedules.
-
Question 15. Why should you configure a scale-in rule along with a scale-out rule?
Show answer
Answer: C. So instances are removed when load drops, reducing cost
Without scale-in, the instance count stays high after demand falls.
-
Question 16. Which scale set orchestration mode supports mixing VM sizes and managing VMs with standard VM APIs?
Show answer
Answer: C. Flexible orchestration
Flexible mode supports different VM types and standard VM operations.
-
Question 17. How do you run a script inside a VM after deployment without signing in to it?
Show answer
Answer: D. Use the Custom Script Extension or Run Command
The Custom Script Extension downloads and runs scripts; Run Command executes scripts on demand.
-
Question 18. What does Azure Disk Encryption use to encrypt a Windows VM's OS and data disks?
Show answer
Answer: B. BitLocker, with keys stored in Key Vault
ADE uses BitLocker on Windows and DM-Crypt on Linux, integrated with Key Vault.
-
Question 19. Which option encrypts VM temp disks and caches at the host, without using CPU inside the VM?
Show answer
Answer: C. Encryption at host
Encryption at host encrypts data on the VM host so temp disks and caches are also encrypted.
-
Question 20. Which managed disk type offers the highest performance with configurable IOPS and throughput?
Show answer
Answer: A. Ultra Disk
Ultra Disks offer sub-millisecond latency and let you adjust IOPS and throughput.
-
Question 21. A dev/test VM needs cheap storage and can tolerate lower performance. Which disk type fits?
Show answer
Answer: C. Standard HDD
Standard HDD is the lowest-cost managed disk option for non-critical workloads.
-
Question 22. You need to move a VM to another region. Which service helps replicate and fail it over?
Show answer
Answer: A. Azure Site Recovery
Site Recovery replicates VMs to another region and can be used for moves and disaster recovery.
-
Question 23. Which feature lets you capture a VM's configuration to create more identical VMs?
Show answer
Answer: B. An image stored in an Azure Compute Gallery
Compute Gallery stores and replicates images and versions for creating VMs at scale.
-
Question 24. Which App Service component determines compute resources, pricing tier, and region for apps?
Show answer
Answer: C. The App Service plan
Apps run in an App Service plan that defines the VM size, instance count, and features.
-
Question 25. You need a staging environment for an App Service app and to swap it into production with no downtime. What should you use?
Show answer
Answer: D. Deployment slots
Slots let you deploy to staging, warm up, and swap with production.
-
Question 26. Which App Service tier is the minimum that supports deployment slots?
Show answer
Answer: C. Standard
Deployment slots are available in Standard, Premium, and Isolated tiers.
-
Question 27. How do you let App Service scale out automatically based on CPU usage?
Show answer
Answer: D. Configure autoscale rules on the App Service plan
Scaling applies to the plan, so all apps in the plan scale together.
-
Question 28. An App Service slot setting is marked as a deployment slot setting. What happens during a swap?
Show answer
Answer: D. The setting stays with its slot instead of moving
Slot-specific settings (sticky settings) don't swap, which is useful for connection strings.
-
Question 29. Which is required to add a custom domain such as www.contoso.com to an App Service app?
Show answer
Answer: B. A DNS record (CNAME or TXT) to verify domain ownership
App Service verifies domain ownership through DNS records before binding the domain.
-
Question 30. An App Service app must reach a database in a virtual network. Which feature enables outbound access to the VNet?
Show answer
Answer: D. VNet integration
VNet integration lets the app make outbound calls into a virtual network.
-
Question 31. What do App Service access restrictions control?
Show answer
Answer: A. Which inbound IP addresses or networks can reach the app
Access restrictions define allow/deny rules for inbound traffic to the app.
-
Question 32. How can you back up an App Service app's content and configuration?
Show answer
Answer: C. Use the built-in backup feature to a storage account
App Service backups save configuration, files, and connected databases to storage.
-
Question 33. Which service runs a container group with multiple containers sharing a network and lifecycle?
Show answer
Answer: B. Azure Container Instances
Container groups in ACI are like pods: containers share the host, network, and storage.
-
Question 34. Which service stores and manages private container images for deployments?
Show answer
Answer: B. Azure Container Registry
Container Registry is a managed private registry based on Docker Registry 2.0.
-
Question 35. Which Azure Container Registry tier supports geo-replication across regions?
Show answer
Answer: C. Premium
Geo-replication is a Premium-only feature for serving images close to deployments.
-
Question 36. How can Azure Container Apps pull images from a private registry without storing passwords?
Show answer
Answer: C. Use a managed identity with the AcrPull role
Managed identities with AcrPull let the app pull images securely.
-
Question 37. What makes Azure Container Apps scale based on events such as queue length?
Show answer
Answer: B. Built-in KEDA scale rules
Container Apps uses KEDA to scale on HTTP traffic, events, CPU, memory, and more, including to zero.
-
Question 38. What is the purpose of a Container Apps environment?
Show answer
Answer: B. A secure boundary where container apps share a network and logs
Apps in the same environment share a virtual network and Log Analytics workspace.
-
Question 39. Which Azure CLI command creates a new VM?
Show answer
Answer: D. az vm create
az vm create provisions a VM with options for image, size, and credentials.
-
Question 40. Which PowerShell cmdlet creates a new Azure VM?
Show answer
Answer: D. New-AzVM
New-AzVM is part of the Az.Compute module.
-
Question 41. What is required to connect to a Linux VM using SSH keys created in the portal?
Show answer
Answer: A. The private key downloaded when the key pair was generated
The portal creates the key pair and gives you the private key once; Azure stores only the public key.
-
Question 42. What does boot diagnostics provide for a VM?
Show answer
Answer: D. Screenshots and serial log output to troubleshoot boot failures
Boot diagnostics help debug VMs that fail to start by showing console output.
-
Question 43. Which feature lets you run VMs on physical servers dedicated to your subscription for compliance?
Show answer
Answer: D. Azure Dedicated Host
Dedicated Host gives you physical servers not shared with other customers.
-
Question 44. What is a proximity placement group used for?
Show answer
Answer: A. Placing VMs physically close together for low latency
Proximity placement groups reduce network latency between VMs.
-
Question 45. How can you add storage capacity to a running VM without affecting the OS disk?
Show answer
Answer: D. Attach a new managed data disk
Data disks can be attached to running VMs and then initialized in the OS.
-
Question 46. What should you remember about the temporary disk on an Azure VM?
Show answer
Answer: C. Data on it can be lost during maintenance or redeployment
The temp disk is local to the host and is not persistent; don't store important data there.
-
Question 47. Which feature can move a VM to a different host to fix an issue, keeping its disks?
Show answer
Answer: A. Redeploy
Redeploy moves the VM to a new node in the Azure infrastructure; temp disk data is lost.
-
Question 48. Before capturing a generalized VM image of Windows, what must you run?
Show answer
Answer: D. Sysprep to remove machine-specific information
Generalizing removes unique info such as the computer SID so the image can create many VMs.
Microsoft and Azure are trademarks of the Microsoft group of companies. These questions are original study material, not questions from the real exam.