Microsoft Azure Administrator (AZ-104) — All Questions
← Back to practice5 questions
You are deploying two VMs that must remain available if a single Azure datacenter (physical location) fails, and you want the strongest infrastructure-level protection within one region. How should you deploy them?
- a.Across multiple availability zones✓
- b.In a single availability set
- c.In the same proximity placement group
- d.On a single VM with Premium SSD disks
Availability zones are physically separate datacenters within a region, so spreading VMs across zones protects against the failure of an entire datacenter. Availability sets only protect against rack-level (fault domain) and update failures within one datacenter. A proximity placement group reduces latency but does not add fault isolation, and a single VM has no redundancy.
Your web application experiences fluctuating traffic and you want a group of identical VMs that automatically increases or decreases instance count based on CPU load. What should you deploy?
- a.A single large VM with manual resizing
- b.An availability set of fixed VMs
- c.Azure Container Instances
- d.A virtual machine scale set with autoscale rules✓
A virtual machine scale set manages a group of identical VMs and can automatically add or remove instances based on metrics like CPU using autoscale rules. Availability sets have a fixed set of VMs and do not scale automatically. A single VM cannot scale out, and Azure Container Instances runs containers, not managed VM fleets.
You want to define your Azure infrastructure as declarative code that is native to Azure, supports idempotent deployments, and offers cleaner syntax than JSON. Which option should you use?
- a.A Bash script that calls Azure CLI commands sequentially
- b.A Bicep file deployed through Azure Resource Manager✓
- c.A manual deployment through the Azure portal
- d.A PowerShell DSC configuration
Bicep is a domain-specific language that compiles to ARM templates, providing declarative, idempotent infrastructure-as-code with simpler syntax than raw JSON ARM templates. Imperative CLI or PowerShell scripts run commands in sequence and are not declarative or inherently idempotent. Portal deployments are manual and not repeatable as code.
You need to run a single, short-lived container for a batch job without managing any orchestration or underlying VM infrastructure. Which Azure service is the simplest fit?
- a.Azure Kubernetes Service (AKS)
- b.A virtual machine scale set
- c.Azure Container Instances (ACI)✓
- d.Azure App Service
Azure Container Instances (ACI) runs individual containers quickly without provisioning or managing VMs or an orchestrator, making it ideal for simple, short-lived or burst workloads. AKS is a full Kubernetes orchestration platform that adds complexity for a single container. App Service hosts web apps, and scale sets manage VMs, not standalone containers.
You want to host a web application without managing the underlying operating system or servers, with built-in support for deployment slots and easy scaling. Which Azure service should you choose?
- a.Azure App Service✓
- b.An availability set of Windows VMs
- c.Azure Container Instances
- d.A virtual machine scale set
Azure App Service is a fully managed platform-as-a-service for hosting web apps and APIs, providing OS management, deployment slots, and scaling without server administration. VMs and scale sets are infrastructure-as-a-service that require you to manage the operating system. ACI runs containers but does not offer the web-app platform features like deployment slots.