Courseiva

CCNA AZ Compute Questions

75 of 190 questions · Page 2/3 · AZ Compute topic · Answers revealed

76
MCQmedium

You plan to run a web application on Azure virtual machines and need protection against a single datacenter failure within an Azure region. Which deployment option should you use?

A.An availability set only
B.Availability zones
C.A proximity placement group
D.A single VM with premium SSD
AnswerB

Availability zones are physically separate datacenters within an Azure region, each with independent power, cooling, and networking. Deploying VMs across zones isolates the workload from a single datacenter failure, so if one zone goes down the application remains available in the others. This is the only option listed that provides datacenter-level resilience.

Why this answer

Availability Zones are physically separate datacenters within an Azure region, each with independent power, cooling, and networking. Deploying your VMs across two or more zones protects against a single datacenter failure because if one zone goes down, the application continues running in the other zone. This meets the requirement for datacenter-level fault tolerance within a single region.

Exam trap

The trap here is that candidates often confuse availability sets (which protect against rack-level failures within one datacenter) with availability zones (which protect against full datacenter failures), leading them to select the cheaper or more familiar option without recognizing the critical difference in fault domain scope.

Why the other options are wrong

A

An availability set protects against failures within a single datacenter (e.g., rack or update domain failures), not against a full datacenter failure within an Azure region. The question requires protection against a single datacenter failure, which spans across datacenters; availability zones are needed for that.

C

A proximity placement group reduces network latency between VMs but does not protect against a single datacenter failure; it may even place VMs in the same datacenter, increasing failure risk.

D

A single VM with premium SSD does not provide protection against a datacenter failure because it is a single instance; if the datacenter hosting that VM fails, the application becomes unavailable.

77
MCQeasy

Two application VMs run in the same Azure region. The business wants to reduce the chance that both VMs are rebooted during planned host maintenance, but a datacenter outage is not part of the requirement. What should the administrator configure?

A.Availability set
B.Availability zone
D.Virtual machine scale set
AnswerA

An availability set spreads VMs across fault domains and update domains within a datacenter. This reduces the chance that all instances are affected by the same host maintenance event. It is the correct choice when the goal is host-level resilience rather than protection against an entire datacenter outage.

Why this answer

An availability set ensures that VMs are placed on different fault domains and update domains within the same Azure datacenter. This configuration guarantees that during planned host maintenance, only one update domain is rebooted at a time, reducing the chance that both VMs are rebooted simultaneously. Since the requirement explicitly excludes a datacenter outage, an availability set is the correct choice to protect against planned maintenance events.

Exam trap

The trap here is that candidates often confuse availability zones (which protect against datacenter outages) with availability sets (which protect against planned maintenance and hardware failures within a single datacenter), leading them to select availability zones even when the requirement explicitly excludes datacenter-level failures.

Why the other options are wrong

B

Availability zones protect against datacenter-level failures, not planned host maintenance within a single datacenter. The question explicitly excludes datacenter outage requirements.

C

Azure Load Balancer distributes traffic across VMs but does not provide any protection against planned host maintenance reboots; it does not ensure VMs are placed on separate update domains.

D

Virtual machine scale sets are designed for scaling out multiple VM instances and provide high availability through distribution across fault domains and update domains, but they are not the simplest solution for just two VMs. The question specifically asks to reduce reboots during planned host maintenance for two VMs, which is best achieved by an availability set that separates VMs into different update domains.

78
MCQmedium

Based on the exhibit, the company will deploy two identical web server VMs in East US 2 behind a load balancer. The service must keep running if one datacenter in the region becomes unavailable. Which deployment choice best meets the requirement?

A.Place both VMs in an availability set so Azure can spread them across fault domains.
B.Place one VM in each of two availability zones and front them with the load balancer.
C.Place both VMs in one availability zone because all zones in a region share failure domains.
D.Deploy a single VM because Azure automatically replicates it across the region.
AnswerB

Availability zones place each VM in a separate datacenter boundary, which protects against one zone failure. If you distribute the web servers across zones, the load balancer can continue sending traffic to the remaining healthy instance when a zone becomes unavailable. This design matches the requirement to survive a datacenter outage within the region.

Why this answer

Deploying one VM in each of two availability zones within East US 2 ensures that the VMs are physically separated across distinct datacenters, each with independent power, cooling, and networking. If one datacenter (zone) fails, the other zone remains operational, and the load balancer automatically directs traffic to the healthy VM. This meets the requirement of keeping the service running if one datacenter in the region becomes unavailable.

Exam trap

The trap here is that candidates often confuse availability sets (which protect against rack-level failures within one datacenter) with availability zones (which protect against full datacenter outages), leading them to choose Option A as a sufficient solution.

Why the other options are wrong

A

An availability set protects against hardware failures within a single datacenter but does not provide resilience if an entire datacenter becomes unavailable, as it spans only fault domains within one datacenter.

C

Option C is wrong because placing both VMs in one availability zone does not protect against a datacenter failure within that zone; if the zone's datacenter fails, both VMs are affected. The requirement is to survive a single datacenter failure, which requires spreading across zones.

D

Azure does not automatically replicate a single VM across a region; a single VM is a single point of failure and cannot survive a datacenter outage.

79
MCQeasy

A production workload must continue running if one entire Azure datacenter in the region becomes unavailable. The region supports availability zones, and you want the strongest placement option for a single VM. What should you choose?

A.Availability zone
B.Availability set
C.Proximity placement group
D.Managed disk snapshot
AnswerA

An availability zone is a physically separate datacenter within an Azure region, with its own power, cooling, and network connectivity. By deploying the VM to a zone, you isolate it from a full datacenter failure elsewhere in the region, so the workload can continue running when another zone's datacenter goes down. To actually keep the VM available you would also need a second VM cross-zone and a load balancer, but the zone placement itself is the foundational resiliency choice.

Why this answer

An availability zone protects against an entire datacenter failure by placing the VM in a physically separate zone within the region, each with independent power, cooling, and networking. This is the strongest placement option for a single VM because it guarantees isolation from other zones, ensuring the workload continues if one datacenter fails. Availability sets only protect against rack-level failures within the same datacenter, not a full datacenter outage.

Exam trap

The trap here is that candidates often confuse availability sets (which protect against rack failures) with availability zones (which protect against datacenter failures), leading them to choose the cheaper or more familiar option without recognizing the requirement for full datacenter resilience.

Why the other options are wrong

B

An availability set protects against failures within a datacenter (e.g., rack or hardware failure) but does not protect against an entire datacenter outage, as all VMs in an availability set are in the same datacenter.

C

A proximity placement group reduces network latency between VMs but does not protect against an entire datacenter failure; it can even place VMs in the same datacenter, increasing risk.

D

Managed disk snapshots are point-in-time backups of disks, not a placement or high-availability option. They do not provide continuous availability if a datacenter fails; they only enable recovery from a backup.

80
MCQmedium

Based on the exhibit, which Azure feature should the administrator use to install software and run the bootstrap script during VM provisioning?

A.Azure VM Custom Script Extension
B.A network security group rule allowing RDP from the Internet
C.An availability set with two fault domains
D.A managed disk snapshot restored as the operating system disk
AnswerA

The Custom Script Extension is designed to run scripts after deployment and is commonly used for first-boot configuration. It can download files, execute installation commands, and automate bootstrap tasks without requiring manual sign-in. This matches the requirement to install IIS, copy application files, and run bootstrap.ps1 as part of provisioning.

Why this answer

The Azure VM Custom Script Extension (CSE) is the correct feature because it allows the administrator to execute scripts (such as installing software or running a bootstrap script) during VM provisioning or after the VM is running. The extension downloads the script from Azure Storage or a public URL and executes it using the local system account, making it ideal for post-deployment configuration tasks.

Exam trap

The trap here is that candidates often confuse network security group rules (which control traffic) or availability sets (which provide redundancy) with the ability to run scripts, but only the Custom Script Extension can execute code during VM provisioning.

Why the other options are wrong

B

A network security group rule allowing RDP from the Internet only controls inbound traffic to the VM, but does not install software or run scripts during provisioning.

C

An availability set with two fault domains is used to ensure high availability by protecting against hardware failures within a datacenter, not for installing software or running scripts during VM provisioning.

D

Restoring a managed disk snapshot as the OS disk provisions a VM from a pre-configured image, but it does not execute a bootstrap script or install software during provisioning; it only replicates the state at snapshot time.

81
MCQeasy

Based on the exhibit, which image source should the administrator use to deploy the same approved server build again?

A.A public marketplace Windows Server image.
B.A custom image stored in Azure Compute Gallery.
C.A snapshot of the VM operating system disk.
D.A temporary disk attached to the VM.
AnswerB

A custom image in Azure Compute Gallery is intended for repeatable deployment of a standardized, generalized VM build. It preserves the patched operating system, installed agent, and line-of-business software so future VMs can be created from the same baseline across environments and subscriptions.

Why this answer

A custom image stored in Azure Compute Gallery (formerly Shared Image Gallery) is the correct choice because it allows the administrator to capture a generalized VM image that includes the exact OS configuration, applications, and settings of the approved server build. This image can then be used repeatedly to deploy identical VMs, ensuring consistency across deployments. Azure Compute Gallery supports versioning and replication across regions, making it the ideal solution for maintaining and distributing a standardized server build.

Exam trap

The trap here is that candidates often confuse a snapshot with a custom image, not realizing that a snapshot is not generalized and cannot be used to deploy multiple identical VMs without manual Sysprep and conversion to a managed image.

How to eliminate wrong answers

Option A is wrong because a public marketplace Windows Server image is a generic, unconfigured base image that does not include the specific applications, patches, or customizations of the approved server build, so it cannot replicate the same build. Option C is wrong because a snapshot of the VM operating system disk captures the disk state at a point in time but is not generalized (it retains the original computer name, SID, and user accounts), and deploying from a snapshot would create a VM with the same identity, leading to conflicts and not a clean, reusable image. Option D is wrong because a temporary disk attached to the VM is a local, ephemeral disk used for temporary storage (e.g., page files) and is not persisted; it cannot be used to deploy a new VM, let alone replicate a server build.

82
MCQmedium

You need to deploy a set of identical Azure virtual machines that can automatically scale out during demand spikes and scale in when usage falls. Which Azure feature should you use?

A.An availability set
B.A Virtual Machine Scale Set
C.A Recovery Services vault
D.Boot diagnostics
AnswerB

Scale Sets provide fleet management and autoscaling for identical VMs.

Why this answer

A Virtual Machine Scale Set (VMSS) is the correct Azure feature because it is designed specifically to deploy and manage a set of identical, load-balanced VMs that can automatically scale out (increase instance count) during demand spikes and scale in (decrease instance count) when usage falls, using autoscale rules based on metrics like CPU or memory.

Exam trap

The trap here is that candidates often confuse an availability set (which provides high availability) with a scale set (which provides both high availability and automatic scaling), leading them to pick Option A when the question explicitly asks for automatic scaling.

Why the other options are wrong

A

An availability set provides high availability by distributing VMs across fault and update domains, but it does not support automatic scaling based on demand.

C

A Recovery Services vault is used for backup and disaster recovery (Azure Backup / Site Recovery), not for automatic scaling of virtual machines.

D

Boot diagnostics captures serial logs and screenshots for troubleshooting VM boot failures, but it does not provide any auto-scaling capabilities to handle demand spikes or scale-in.

83
MCQhard

A release team needs to deploy the same hardened Windows image to VMs in three regions. They must keep approved versions, replicate images to each region, and be able to roll back to an earlier approved version without uploading a new VHD. What should they use as the image source?

A.A managed disk snapshot captured from one reference VM
B.An Azure Compute Gallery image definition with image versions
C.A single unmanaged VHD stored in a storage account
D.A custom script extension that installs the operating system settings after deployment
AnswerB

An Azure Compute Gallery (formerly Shared Image Gallery) image definition acts as a schema for the OS, state, and regional replication settings, while image versions are immutable, versioned snapshots of that schema. This combination supports controlled rollout via replication to multiple regions, rolling back to a previous image version, and enforcing consistent hardened configurations across VM deployments, which is exactly what a release team needs for managed OS lifecycle management.

Why this answer

Azure Compute Gallery (formerly Shared Image Gallery) allows you to store multiple versions of a custom image definition, replicate them across regions, and manage rollbacks by simply changing which image version is referenced during deployment. This meets all requirements: hardened Windows image, multi-region replication, version control, and rollback without uploading a new VHD.

Exam trap

The trap here is that candidates often confuse managed disk snapshots with images, not realizing that snapshots lack the versioning, replication, and deployment flexibility that Azure Compute Gallery provides for multi-region scenarios.

Why the other options are wrong

A

A managed disk snapshot is tied to a single region and cannot be replicated across multiple regions. It also does not support versioning or rollback to earlier approved versions without uploading a new VHD.

C

A single unmanaged VHD stored in a storage account cannot be versioned or replicated across regions, and rolling back to an earlier version would require uploading a new VHD, failing the requirement to keep approved versions and enable rollback without re-uploading.

D

A custom script extension installs OS settings after deployment but does not provide a hardened Windows image source, versioning, or rollback capability without uploading a new VHD.

84
Multi-Selectmedium

Two workloads have different resilience requirements. Workload A must stay available if a single datacenter in the region fails. Workload B only needs protection from planned maintenance and a single hardware host failure. Which two deployment models should the administrator use? Select two.

Select 2 answers
A.Availability Zones for Workload A
B.Availability Set for Workload B
C.Virtual Machine Scale Set without zones
D.Proximity Placement Group
E.Single VM with premium SSD
AnswersA, B

Availability Zones are physically separate locations within an Azure region, each with independent power, cooling, and networking. By deploying Workload A across two or more zones, you ensure that a failure in one zone does not affect the other, protecting against a complete datacenter outage. This configuration achieves the highest resilience SLA of 99.99% for virtual machines.

Why this answer

Workload A requires protection against a full datacenter failure within a region. Availability Zones are physically separate datacenters within an Azure region, each with independent power, cooling, and networking. Deploying VMs across multiple zones ensures that if one zone (datacenter) fails, the workload remains available in another zone.

Workload B only needs protection from planned maintenance and a single hardware host failure. An Availability Set distributes VMs across multiple fault domains (hardware hosts) and update domains (planned maintenance cycles), providing resilience against these specific failure scenarios without requiring zone-level separation.

Exam trap

The trap here is that candidates often confuse Availability Zones with Availability Sets, mistakenly thinking an Availability Set can protect against a full datacenter failure, or they assume a Virtual Machine Scale Set inherently provides zone-level resilience without explicitly configuring zones.

Why the other options are wrong

C

Virtual Machine Scale Set without zones does not protect against a full datacenter failure, as it operates within a single datacenter. It also does not provide the planned maintenance and single host failure protection that an Availability Set offers for Workload B.

D

Proximity Placement Groups reduce network latency between VMs but do not provide resilience against datacenter failures or planned maintenance; they are not a deployment model for high availability.

E

A single VM with premium SSD does not provide high availability; it protects only against disk failure, not datacenter or host failure, failing both Workload A's requirement for datacenter failure resilience and Workload B's need for planned maintenance protection.

85
MCQeasy

A platform team must deploy the same group of Azure VMs every month from source control and wants the deployment to be repeatable and reviewable. Which approach should they use?

A.Manual portal deployment each month
B.A Bicep template in source control
C.A temporary virtual machine snapshot
D.A network security group rule collection
AnswerB

Bicep is an infrastructure-as-code language that is concise, readable, and well suited for Azure deployments. Storing the template in source control makes the deployment repeatable, auditable, and easy to modify over time. It is a strong choice when the team wants the same VM deployment every month.

Why this answer

Bicep is a domain-specific language (DSL) for deploying Azure resources declaratively. Storing a Bicep template in source control ensures the VM deployment is repeatable (same parameters produce identical infrastructure) and reviewable (changes are tracked via pull requests and commit history), meeting the team's requirements for infrastructure as code (IaC).

Exam trap

The trap here is that candidates may confuse a VM snapshot (a backup artifact) with a deployment template, or think manual portal steps can be 'repeatable' if documented, but Azure explicitly tests the concept that only IaC (Bicep/ARM) ensures true repeatability and auditability from source control.

Why the other options are wrong

A

Manual portal deployment is not repeatable, reviewable, or sourced from version control, failing the requirements for automation and auditability.

C

A temporary virtual machine snapshot is used for backup or recovery, not for repeatable, reviewable deployments from source control. It does not support versioning or infrastructure-as-code practices.

D

A network security group (NSG) rule collection controls traffic filtering, not VM deployment. It cannot deploy or manage VMs, so it fails to meet the requirement for repeatable and reviewable deployment from source control.

86
MCQeasy

Based on the exhibit, the workload must keep running if an entire datacenter in the region becomes unavailable. The region supports availability zones. What should you deploy?

A.An availability set with one update domain per VM.
B.Availability zones with the VMs distributed across zones.
C.A single VM with a premium SSD data disk.
D.An Azure proximity placement group.
AnswerB

Availability zones are the correct choice because they place resources in separate datacenters within the same region. That gives the application resilience if one datacenter or zone becomes unavailable. The scenario explicitly asks for datacenter-level protection, which is what zones are designed to provide.

Why this answer

Availability zones are physically separate datacenters within an Azure region, each with independent power, cooling, and networking. Deploying VMs across multiple zones ensures that if one entire datacenter fails, the workload continues running in the other zone(s), meeting the requirement for regional datacenter-level resilience.

Exam trap

The trap here is confusing availability sets (which protect against rack-level failures) with availability zones (which protect against datacenter-level failures), leading candidates to choose an availability set when the question explicitly requires surviving an entire datacenter outage.

Why the other options are wrong

A

An availability set protects against failures within a single datacenter (rack/update domain failures), not against an entire datacenter becoming unavailable. The question requires resilience across datacenters, which availability sets cannot provide.

C

A single VM with a premium SSD data disk does not provide high availability; it is a single point of failure. If the datacenter becomes unavailable, the VM and its data are inaccessible, failing to meet the requirement of keeping the workload running.

D

A proximity placement group reduces network latency between VMs but does not protect against an entire datacenter failure because it does not distribute VMs across different availability zones or fault domains.

87
MCQhard

A line-of-business web tier consists of two Azure VMs in a region that supports availability zones. The business requirement is to survive a full datacenter outage in that region without deploying to a second region. What should the administrator use?

A.An availability set with multiple update domains
B.Availability zones with the VMs placed in different zones
C.A proximity placement group for both VMs
D.A single-zone virtual machine scale set
AnswerB

Availability zones are physically separate datacenter locations within an Azure region, each with independent power, cooling, and networking. By placing the two VMs in different zones, you eliminate a single-datacenter dependency, so if one zone experiences an outage (e.g., a regional storm or cooling failure), the other VM remains online. This is the only option listed that provides true datacenter-level fault isolation while keeping both VMs in the same region for low-latency traffic.

Why this answer

Availability zones are physically separate datacenters within an Azure region, each with independent power, cooling, and networking. Placing the two VMs in different zones ensures that if one entire datacenter fails, the other VM remains operational, meeting the requirement to survive a full datacenter outage without deploying to a second region.

Exam trap

The trap here is that candidates confuse availability sets (which protect within a datacenter) with availability zones (which protect across datacenters), leading them to choose an availability set despite the explicit requirement to survive a full datacenter outage.

Why the other options are wrong

A

An availability set protects against rack-level failures within a single datacenter, not against a full datacenter outage. The requirement to survive a full datacenter outage demands distribution across availability zones, which are physically separate datacenters within a region.

C

A proximity placement group reduces network latency between VMs but does not protect against a full datacenter outage because all VMs in the group could be in the same datacenter.

D

A single-zone VMSS places all VMs in the same availability zone, which cannot survive a full datacenter outage because that zone is tied to a single datacenter.

88
Multi-Selecthard

A developer has the Contributor role on a resource group. A Bicep deployment that creates a VM with a public IP fails with a policy denial, but the same template succeeds after the public IP resource is removed. Which two statements are true? Select two.

Select 2 answers
A.The Contributor role allows deployments in the resource group, but it cannot override a deny policy inherited from a higher scope.
B.The policy assignment can apply to the resource group because policy inheritance flows from management group to subscription to resource group.
C.A CanNotDelete lock is the reason the public IP resource cannot be created.
D.Assigning Owner on the resource group would automatically bypass the policy denial and allow the template to deploy unchanged.
E.Moving the VM to another subnet in the same virtual network would remove the inherited policy effect.
AnswersA, B

Contributor grants broad management rights within its scope, but Azure Policy enforcement is separate from RBAC. A deny effect blocks the resource creation even when the user has sufficient permissions. The fact that the deployment succeeds once the public IP is removed strongly indicates a policy rule, not a permissions issue.

Why this answer

The Contributor role grants full management access to resources within the resource group, but it cannot override Azure Policy effects such as 'deny'. Policy inheritance flows from higher scopes (management group, subscription) down to the resource group, and even a Contributor cannot bypass a deny policy assigned at a higher scope. The Bicep deployment fails specifically because the public IP resource violates a policy rule, not because of a lack of permissions on the role itself.

Exam trap

The trap here is confusing Azure Policy denials with Azure role-based access control (RBAC) or resource locks, leading candidates to incorrectly assume that a higher-privileged role like Owner can override a policy denial, or that a CanNotDelete lock blocks resource creation.

Why the other options are wrong

C

A CanNotDelete lock prevents deletion of existing resources, not creation of new ones. The failure is due to a policy denial, not a lock.

D

Assigning the Owner role on the resource group does not automatically bypass Azure Policy denials. Policies are enforced at the Azure Resource Manager level and override any role permissions, including Owner.

E

Moving a VM to another subnet does not affect policy inheritance; policies are assigned to scopes (management group, subscription, resource group) and apply to all resources within that scope regardless of subnet.

89
MCQmedium

Based on the exhibit, what should the administrator configure so the container group can pull the private image without storing registry credentials?

A.Assign a managed identity to the container group and grant it AcrPull on the registry.
B.Store the ACR admin account password in a container environment variable.
C.Use a SAS token for the container image reference.
D.Place the registry in the same resource group as the container group.
AnswerA

Managed identity-based access is the correct secret-free method for Azure Container Instances to authenticate to Azure Container Registry. By assigning an identity to the container group and granting that identity the AcrPull role on the registry, the group can pull the private image without storing credentials in the template. This satisfies both security and operational requirements.

Why this answer

Azure Container Groups support managed identities, which allow the container group to authenticate to Azure Container Registry (ACR) without storing any credentials. By assigning a system-assigned or user-assigned managed identity to the container group and granting it the AcrPull role on the registry, the container runtime can use Azure AD authentication to pull the private image. This eliminates the need to store registry admin credentials or SAS tokens in the container configuration.

Exam trap

The trap here is that candidates often confuse SAS tokens (used for Azure Storage) with ACR authentication, or assume that resource group placement or admin credentials are valid solutions, when the core requirement is to use Azure AD-based authentication via a managed identity to avoid storing any credentials.

Why the other options are wrong

B

Storing the ACR admin account password in a container environment variable exposes credentials in plain text, which violates security best practices and does not meet the requirement of 'without storing registry credentials.'

C

A SAS token is used for granting time-limited access to Azure Storage resources, not for authenticating to Azure Container Registry. Container groups pull images using registry credentials, not SAS tokens.

D

Placing the registry in the same resource group as the container group does not grant any authentication permissions; the container group still needs credentials to pull a private image.

90
MCQeasy

A web front end must automatically add or remove instances based on demand. The application is stateless and all instances should be managed as one group. Which Azure service should you use?

A.A single Azure VM with a larger size
B.Virtual Machine Scale Set
C.Availability set
D.Managed disk snapshots
AnswerB

A Virtual Machine Scale Set is designed for multiple similar VMs that need to scale together. It is a good fit for stateless workloads because instances can be added or removed without special per-VM configuration. You can also combine it with autoscale rules to respond to changing demand automatically.

Why this answer

Virtual Machine Scale Sets (VMSS) automatically scale the number of VM instances in or out based on demand or a defined schedule, making them ideal for stateless, horizontally scalable applications. They manage all instances as a single group behind a load balancer, ensuring uniform configuration and seamless scaling without manual intervention.

Exam trap

The trap here is that candidates confuse availability sets (which only provide fault tolerance) with auto-scaling, or mistakenly think that a single large VM can handle variable load by resizing, when the question explicitly requires automatic addition/removal of instances as a group.

Why the other options are wrong

A

A single larger VM cannot automatically scale out/in based on demand; it only provides more resources for a single instance, not dynamic scaling across multiple instances.

C

An availability set provides high availability for VMs within a datacenter but does not support automatic scaling based on demand. It cannot add or remove instances automatically.

D

Managed disk snapshots are point-in-time backups of disks, not a scaling solution. They cannot automatically add or remove instances based on demand.

91
MCQeasy

You want to deploy a resource group with Bicep and see the changes Azure plans to make before you apply them. Which command should you run?

A.az deployment group what-if
B.az deployment group create
C.az group delete
D.az vm update
AnswerA

The `az deployment group what-if` command is specifically designed to preview the changes that a Bicep or ARM template deployment would make to a resource group, without actually applying them. It runs Azure's What-If engine on the compiled template and reports resource additions, deletions, and property modifications, giving you a safe, pre-flight review of the deployment plan.

Why this answer

The `az deployment group what-if` command is correct because it performs a dry-run validation of a Bicep (or ARM) deployment against a resource group, showing the changes Azure will make (create, modify, delete) without actually applying them. This is the Azure equivalent of a 'what-if' analysis, allowing you to review the impact before execution.

Exam trap

The trap here is that candidates often confuse `az deployment group what-if` with `az deployment group create`, assuming that `create` also provides a preview, but `create` immediately applies changes without any dry-run capability.

Why the other options are wrong

B

The `az deployment group create` command deploys resources immediately without previewing changes, whereas the question specifically asks to see planned changes before applying them.

C

The 'az group delete' command removes a resource group and its resources, not preview changes. The question asks to see planned changes before applying them, which requires the what-if operation.

D

The 'az vm update' command is used to modify properties of an existing virtual machine, not to preview changes before deploying a resource group with Bicep.

92
MCQmedium

A team standardizes 30 Windows VMs for a line-of-business application. They install IIS, a monitoring agent, and baseline security settings on one reference VM. Future deployments must use that same build and be easy to version. Which Azure feature should the administrator create?

A.A snapshot of the reference VM's OS disk
B.An image version in Azure Compute Gallery
C.An availability set for the reference VM
D.A custom script extension on each new VM
AnswerB

Azure Compute Gallery is designed for publishing, versioning, and distributing custom VM images. It lets administrators capture a hardened reference image, create managed versions, and deploy consistent new VMs from that approved build across environments or regions.

Why this answer

B is correct because an image version in Azure Compute Gallery (formerly Shared Image Gallery) captures the entire VM configuration—including IIS, monitoring agent, and security settings—into a reusable, versioned image. This allows the team to deploy standardized VMs from the same build and easily manage updates by creating new image versions, meeting the requirements for consistency and versioning.

Exam trap

The trap here is that candidates often confuse a snapshot with an image, thinking a snapshot can be used to deploy standardized VMs, but snapshots lack versioning, regional replication, and the ability to create multiple VMs directly without additional conversion steps.

Why the other options are wrong

A

A snapshot captures only the OS disk at a point in time and does not support versioning, sharing across subscriptions, or creating multiple VMs with the same build easily. It lacks the image management and replication capabilities needed for standardized, version-controlled deployments.

D

Custom script extensions run post-deployment tasks but do not capture or version the entire VM build (OS, IIS, agent, security settings). The question requires a reusable, versioned image, which only Azure Compute Gallery provides.

93
MCQmedium

Based on the exhibit, which restart policy should be configured for the container group?

A.Always
B.OnFailure
C.Never
D.UnlessStopped
AnswerC

Never is the correct restart policy for a one-time task that should stop after finishing successfully. The exhibit describes a batch-style import job, not a long-running service. Using Never ensures the container exits and stays stopped until the next deployment or scheduled run. That behavior matches operational expectations for a completed import process.

Why this answer

The container group in the exhibit is configured with a restart policy of 'Never' because it is designed to run a batch job that should execute once and then terminate. Azure Container Instances supports three restart policies: Always, OnFailure, and Never. Since the task is a one-time job, 'Never' ensures the container does not restart after completion, which is the correct choice for a single-run workload.

Exam trap

The trap here is that candidates confuse Docker's native restart policies (which include 'UnlessStopped') with Azure Container Instances' supported policies, leading them to select 'UnlessStopped' even though it is not available in ACI.

Why the other options are wrong

A

The exhibit shows a container group that runs a batch job; 'Always' would cause the container to restart indefinitely even after successful completion, which is not desired for a one-time task.

B

The container group is designed for a single-run task (e.g., a batch job) that must not restart after completion. OnFailure would restart the container if it exits with a non-zero code, but the task is expected to succeed and should not restart even on failure.

D

The question asks for a restart policy for a container group, and 'UnlessStopped' is not a valid restart policy for Azure Container Instances; the valid options are Always, Never, and OnFailure.

94
MCQmedium

After a Windows VM is deployed, an administrator must install IIS, copy application files, and run a post-deployment configuration script without connecting interactively to the server. Which Azure feature should be used?

A.Custom Script Extension.
B.An availability zone assignment.
C.A route table association.
D.A user-assigned managed identity alone.
AnswerA

The Custom Script Extension (CSE) is a VM extension that executes scripts on the virtual machine immediately after provisioning or at any later time. It runs as SYSTEM (Windows) or root (Linux), enabling commands such as `Install-WindowsFeature Web-Server` or `apt install nginx` without requiring an interactive RDP/SSH session. CSE can be deployed via ARM templates, Azure CLI, PowerShell, or portal, and is the standard method for post-deployment software installation like IIS. It supports idempotency if the script is written to check for existing installations, and it can retrieve scripts from Azure Storage or GitHub.

Why this answer

The Custom Script Extension (CSE) is the correct Azure feature because it allows you to run scripts on an Azure VM after deployment without requiring interactive login. It is specifically designed for post-deployment configuration tasks like installing IIS, copying application files, and executing configuration scripts, all executed via the Azure VM agent.

Exam trap

The trap here is that candidates may confuse the Custom Script Extension with other automation tools like Azure Automation or Desired State Configuration (DSC), but the question specifically requires a feature that runs a script post-deployment without interactive login, and CSE is the direct, lightweight solution for that task.

Why the other options are wrong

B

Availability zones are for high availability and fault tolerance by distributing resources across physically separate datacenters; they do not provide any mechanism to install software or run scripts on a VM.

C

A route table association controls network traffic routing between subnets and does not install software or run scripts on a VM.

D

A user-assigned managed identity alone provides authentication to Azure resources but does not execute scripts or install software on a VM. The question requires running a post-deployment configuration script, which is beyond the capability of a managed identity.

95
Multi-Selecthard

After applying a custom image, a Linux VM stops at a black screen before the sign-in prompt. The administrator cannot use RDP or SSH and needs the fastest way to inspect the boot process. Which two actions should they take? Select two.

Select 2 answers
A.Enable Boot diagnostics on the virtual machine.
B.Review the screenshot and serial log in Boot diagnostics.
C.Reimage the VM immediately to a clean managed disk.
D.Increase the VM size to a larger SKU.
E.Reset the network interface configuration from the portal.
AnswersA, B

Enabling boot diagnostics on the VM is the necessary first step because it instructs Azure to capture both a screenshot of the guest display and the serial console log during the boot process. This setting can be enabled on an existing VM without downtime, and it must be active before a reboot so that the failing boot sequence is recorded. Without this, you have no insight into the black screen and are forced to guess at the cause.

Why this answer

Enabling Boot diagnostics on the virtual machine allows the administrator to capture serial console output and screenshots of the VM during boot. This is the fastest way to inspect the boot process without requiring network connectivity (RDP/SSH), as the serial log provides kernel-level messages and the screenshot shows the display state at the point of failure.

Exam trap

The trap here is that candidates may assume RDP/SSH are the only ways to diagnose a VM, overlooking that Boot diagnostics provides out-of-band access to boot-time information even when the OS is unresponsive.

Why the other options are wrong

D

Increasing the VM size does not address boot failures caused by a custom image issue; it only provides more resources, which won't fix a corrupted boot process or driver incompatibility.

E

Resetting the network interface configuration does not address a boot failure at the black screen, which is a boot process issue unrelated to networking.

96
MCQeasy

A team has an approved Windows VM that already includes their application, patches, and monitoring agent. They want future VMs to start with the same configuration. What should they use?

A.A managed image created from the approved VM
B.An availability set
C.A snapshot of the OS disk
D.A larger virtual machine size
AnswerA

A managed image captures the configured operating system and installed software so you can deploy new VMs with the same baseline. This is the simplest way to standardize a known-good VM configuration for repeated use. It fits the requirement because the team wants future VMs to start from the same approved setup, not rebuild the software manually each time. It is an operationally common choice for consistent VM deployment.

Why this answer

A managed image captures the entire VM configuration, including the OS, application, patches, and monitoring agent, allowing you to create multiple identical VMs from a single source. Unlike a snapshot, which is tied to a specific disk and requires manual steps to replicate the full VM setup, a managed image provides a reusable template for consistent deployments. This approach ensures future VMs start with the exact same configuration as the approved VM.

Exam trap

The trap here is that candidates often confuse a snapshot with a managed image, not realizing that a snapshot only captures a single disk's state and lacks the VM-level configuration needed to create a fully functional VM directly.

Why the other options are wrong

B

An availability set is used to ensure high availability by distributing VMs across fault and update domains, not to capture a VM's configuration for reuse.

C

A snapshot of the OS disk captures only the disk state at a point in time, but it cannot be used directly to deploy new VMs with the same configuration; you would need to create a managed image from the snapshot first.

D

Increasing the VM size only changes the hardware resources (CPU/RAM) and does not capture or replicate the OS configuration, application, patches, or monitoring agent. It does not create a reusable template for future VMs.

97
Multi-Selectmedium

A development team needs a new Windows VM created from an approved hardened image, and IIS must be installed automatically after deployment. Which three actions should the administrator take? Select three.

Select 3 answers
A.Use an Azure Compute Gallery image version created from the approved hardened build.
B.Reference that gallery image as the source image in the VM deployment.
C.Include the IIS extension or a custom script extension in the same deployment template or script.
D.Start from a fresh marketplace image and harden it manually after the VM is running.
E.Install IIS interactively after logging in to the VM with an administrator account.
AnswersA, B, C

Azure Compute Gallery (formerly Shared Image Gallery) centralizes approved VM images and supports versioning, so the hardened Windows build is captured once and can be reused without re-hardening. It also allows replication to multiple regions and controlled sharing across subscriptions/tenants, making it the authoritative source for compliant VM deployments. This directly addresses the requirement for an approved baseline rather than ad-hoc configuration.

Why this answer

An Azure Compute Gallery (formerly Shared Image Gallery) allows you to create and store custom VM images, including hardened builds. Using a gallery image version ensures the VM is deployed from an approved, pre-configured image that meets security and compliance requirements, avoiding the need to manually harden a fresh marketplace image.

Exam trap

The trap here is that candidates may think manual hardening or interactive installation is acceptable, but the question explicitly requires automation and an approved hardened image, making options D and E incorrect because they lack automation and consistency.

Why the other options are wrong

D

Starting from a fresh marketplace image and manually hardening it after deployment contradicts the requirement to use an approved hardened image and automate IIS installation, as it introduces manual steps and potential configuration drift.

E

The question requires automated IIS installation after deployment, but this option involves manual interactive login, which is not automated and violates the 'automatically' requirement.

98
Multi-Selectmedium

Two line-of-business VMs in a single region must stay available if one physical host is patched or fails. A zone failure is not part of the requirement. Which three actions should the administrator take? Select three.

Select 3 answers
A.Create an availability set for the application VMs before deployment.
B.Deploy both VMs into the same availability set.
C.Allow Azure to place the VMs across different fault and update domains within the availability set.
D.Deploy the VMs in separate availability zones to protect against a datacenter outage.
E.Use a single larger VM and rely on snapshots for uptime.
AnswersA, B, C

Creating an availability set before deploying the VMs is mandatory because Azure does not allow you to add an existing VM into an availability set after creation; the VM must be placed into the set at the time of provisioning. By defining the availability set first, you ensure that both VMs are created with the set's fault and update domain constraints applied from the start, which is the foundational step for achieving the 99.95% availability SLA for multi-instance deployments. Without this upfront creation, the workload cannot be properly distributed across distinct failure boundaries.

Why this answer

An availability set ensures that VMs are placed on different fault domains (physical hosts) and update domains within a single Azure region, protecting against physical host patching or failure. This meets the requirement of keeping VMs available during a single host event without requiring zone-level redundancy.

Exam trap

The trap here is that candidates often confuse availability sets (protecting against host failure) with availability zones (protecting against datacenter failure), leading them to select zone-based deployment when the requirement only specifies a single host failure scenario.

Why the other options are wrong

D

The requirement specifies that a zone failure is not part of the requirement, so deploying VMs in separate availability zones is unnecessary and does not address the need to protect against a single physical host failure or patching event.

E

Using a single larger VM with snapshots does not provide high availability; if the host fails, the VM is unavailable until restored from a snapshot, which can take significant time and may lose data. The requirement is for continuous availability during host patching or failure, not just data protection.

99
MCQeasy

A line-of-business app runs on two Azure VMs in the same region. The business wants to reduce the chance that both VMs are affected by the same planned host update. What should the administrator use?

A.An availability set
B.A public load balancer
C.A managed image
D.A private endpoint
AnswerA

An availability set spreads VMs across fault domains and update domains within a datacenter environment. This reduces the chance that a planned host update or a hardware issue affects both VMs at the same time. It is the right choice when the goal is host-level resilience for VMs in the same region.

Why this answer

An availability set ensures that VMs are placed on different fault domains and update domains within an Azure datacenter. Fault domains isolate VMs from shared hardware failures, while update domains ensure that planned host updates (e.g., OS patching) are applied sequentially across groups, so not all VMs are rebooted simultaneously. This directly reduces the chance that both VMs are affected by the same planned host update.

Exam trap

The trap here is that candidates often confuse availability sets (logical grouping for update/fault domain isolation within a single datacenter) with availability zones (physical separation across datacenters), or mistakenly think a load balancer provides high availability against planned maintenance, when it only distributes traffic and does not affect host placement.

Why the other options are wrong

B

A public load balancer distributes traffic across VMs but does not protect against planned host updates affecting both VMs simultaneously, as it does not control the underlying host maintenance schedule.

C

A managed image is used to create standardized VM configurations, not to protect against planned host updates. It does not provide fault isolation across update domains.

D

A private endpoint provides secure connectivity to Azure PaaS services over a private IP address, but it does not protect VMs from planned host updates or provide fault tolerance across update domains.

100
Drag & Dropmedium

Order the steps to configure Azure DNS for a custom domain.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4

Why this order

The correct sequence for configuring Azure DNS for a custom domain is: create the DNS zone, retrieve the Azure-assigned name servers, update your domain registrar to use those name servers, add the required DNS records (e.g., A, CNAME) to the zone, and finally verify domain resolution. This order ensures that delegation is properly set before records are queried, and avoids common pitfalls such as updating the registrar without the correct name servers or trying to retrieve name servers before the zone exists.

101
MCQhard

A web application runs in Azure App Service and uploads files to Azure Blob Storage. The storage account has shared key access disabled, and the app must not store secrets in configuration. If the App Service is deleted and recreated later, the storage access should be removed automatically with the app. What should you configure?

A.A system-assigned managed identity with Blob Data Contributor permissions on the container.
B.A user-assigned managed identity with Blob Data Reader permissions on the storage account.
C.A shared access signature generated from the storage account key.
D.A storage account access key stored in an application setting.
AnswerA

A system-assigned managed identity is tied directly to the App Service instance and disappears when the app is deleted, which satisfies the automatic cleanup requirement. Because shared key access is disabled and secrets are not allowed in configuration, the app should authenticate through Microsoft Entra ID using the managed identity. Assigning Blob Data Contributor at the appropriate scope allows upload access without storing credentials.

Why this answer

A system-assigned managed identity is tied to the App Service lifecycle, so when the app is deleted, the identity is automatically removed, revoking access to Blob Storage. Granting Blob Data Contributor permissions on the container allows the app to upload files without storing any secrets, satisfying the requirement that shared key access is disabled and no secrets are stored in configuration.

Exam trap

The trap here is that candidates might choose a user-assigned managed identity (Option B) because it also avoids secrets, but they overlook the requirement that access must be automatically removed when the app is deleted, which only a system-assigned identity guarantees.

Why the other options are wrong

B

The question requires the app to upload files (write access), but Blob Data Reader only allows read access. Also, a user-assigned managed identity persists independently of the App Service lifecycle, so deleting the App Service would not automatically remove storage access.

C

Shared access signatures (SAS) require a secret (the storage account key or user delegation key) to generate, and the question states the app must not store secrets in configuration. Additionally, SAS tokens do not automatically revoke when the App Service is deleted unless a stored access policy is used, which still requires secret management.

D

Shared key access is disabled, so storage account access keys cannot be used. Additionally, storing the key in an application setting violates the requirement to not store secrets in configuration.

102
MCQmedium

After a custom image is applied, a VM restarts to a black screen and never reaches the login prompt. The administrator needs the fastest way to inspect what happened during boot without logging into the guest OS. What should be enabled or reviewed first?

A.Boot diagnostics
B.Azure Monitor metric alert
C.VM extension status
D.Network Watcher IP flow verify
AnswerA

Boot diagnostics captures a screenshot and serial log data that help diagnose failures before the guest OS loads.

Why this answer

Boot diagnostics captures serial console output and screenshots of the VM during boot, allowing you to inspect boot failures like a black screen without guest OS access. This is the fastest method because it provides immediate, out-of-band visibility into the boot process, including kernel panics or driver issues, without requiring RDP or SSH connectivity.

Exam trap

The trap here is that candidates often confuse Boot diagnostics (which captures boot-time logs and screenshots) with VM extension status or metrics, mistakenly thinking they can diagnose a boot failure from post-boot telemetry or network checks.

Why the other options are wrong

B

Azure Monitor metric alerts monitor performance metrics (e.g., CPU, memory) and trigger notifications, but they do not provide boot-time logs or screenshots to diagnose a black screen issue during VM startup.

D

Network Watcher IP flow verify checks connectivity and security rules for network traffic, not boot issues or OS startup logs. It cannot inspect what happened during VM boot.

103
MCQeasy

A workload needs more CPU and memory than the current Azure VM size provides. The administrator wants to increase compute capacity without redeploying the application. What should be done?

A.Resize the VM to a larger size
B.Move the VM into an availability set
C.Replace the VM with a snapshot
D.Assign a user-assigned managed identity
AnswerA

Resizing the VM to a larger size is the direct method to scale up because it changes the VM's SKU to a size with more vCPUs and memory while retaining the same OS disk, data disks, and installed applications. In Azure, you can initiate a resize either while the VM is running (for most size families) or after stopping/deallocating it if the target size is in a different hardware cluster. This preserves the VM identity, IP, and configuration, making it the proper way to satisfy increased CPU and memory demands.

Why this answer

Resizing the Azure VM to a larger size (option A) directly increases the CPU and memory resources allocated to the VM without requiring redeployment of the application. Azure supports resizing VMs within the same hardware family or to a different family, provided the new size is available in the current region and the VM is not part of a VMSS with overprovisioning constraints. The resize operation updates the VM's SKU, and after a reboot, the new resources are available to the OS and applications.

Exam trap

The trap here is that candidates may confuse 'increasing compute capacity' with high availability features (availability set) or identity management, leading them to select options that do not address resource scaling.

Why the other options are wrong

B

Moving a VM into an availability set does not increase its CPU or memory capacity; it only provides high availability by distributing VMs across fault domains and update domains.

C

Replacing the VM with a snapshot does not increase compute capacity; it creates a new VM from a snapshot, which still requires selecting a VM size. The goal is to increase CPU and memory without redeploying, and resizing the existing VM achieves that directly.

D

Assigning a user-assigned managed identity does not increase CPU or memory; it only provides an identity for Azure resource authentication.

104
Multi-Selectmedium

A customer-facing application has two goals: it must keep running if one datacenter in the region fails, and it must be able to scale out automatically during daily peaks. Which two Azure compute choices best match those requirements? Select two.

Select 2 answers
A.Deploy the workload across Availability Zones
B.Place all instances in one Availability Set
C.Use a Virtual Machine Scale Set with autoscale
D.Run a single VM behind a load balancer
E.Use a proximity placement group
AnswersA, C

Deploying the workload across Availability Zones is correct because each zone is an isolated datacenter with independent power, cooling, and networking. If one zone fails, the other zones continue serving traffic, eliminating a single datacenter as a point of failure. Azure offers a 99.99% availability SLA when instances are distributed across two or more zones, directly supporting the goal of keeping the application running during an outage.

Why this answer

Deploying across Availability Zones provides datacenter-level fault tolerance: each zone is an isolated physical datacenter with independent power, cooling, and networking. If one zone fails, the application continues running in the other zones. Option C is correct because a Virtual Machine Scale Set with autoscale automatically adjusts the number of VM instances based on CPU or memory metrics, enabling the application to scale out during daily peaks and scale in during off-peak hours.

Exam trap

The trap here is that candidates often confuse Availability Sets (which protect against rack failures) with Availability Zones (which protect against datacenter failures), and they may overlook that a single VM behind a load balancer still has a single point of failure.

Why the other options are wrong

B

An Availability Set only protects against rack-level failures within a single datacenter, not against a full datacenter outage. It also does not provide automatic scaling.

D

A single VM cannot survive a datacenter failure because it is a single point of failure, and it cannot scale out automatically since scaling requires multiple instances.

E

A proximity placement group reduces network latency between VMs but does not provide datacenter failure resilience or automatic scaling, which are the two key requirements.

105
MCQmedium

A container group in Azure Container Instances must pull a private image from Azure Container Registry without embedding registry credentials in the template. What should you configure?

A.A managed identity for the container group and the AcrPull role on the registry
B.An admin user account on the Azure Container Registry
C.A shared access signature in a container environment variable
D.A public network access rule that allows all Azure services
AnswerA

A user-assigned or system-assigned managed identity provides the container group with an Azure AD-backed identity that ACR accepts for authentication, entirely avoiding embedded secrets. The identity must be explicitly assigned the AcrPull role on the registry so the container group has permission to pull the image; without that role, ACR rejects the token despite a valid identity. This is the recommended and only credential-free method for ACI-to-ACR authentication.

Why this answer

Azure Container Instances (ACI) can authenticate to Azure Container Registry (ACR) using a managed identity assigned to the container group. By granting the managed identity the AcrPull role on the registry, ACI can pull private images without embedding any credentials in the deployment template, leveraging Azure AD authentication and RBAC for secure access.

Exam trap

The trap here is that candidates often confuse network access controls (like 'Allow Azure Services' or service endpoints) with authentication mechanisms, assuming that enabling network rules alone grants pull access, when in fact a managed identity with AcrPull is required for credential-free authentication.

Why the other options are wrong

B

Using an admin user account embeds credentials in the template or requires manual entry, which violates the requirement to avoid embedding registry credentials.

C

A shared access signature (SAS) is used to grant limited access to Azure resources like storage blobs, not to authenticate a container group to pull images from Azure Container Registry. The question requires pulling a private image without embedding credentials, which is achieved via managed identity and AcrPull role, not SAS.

D

Configuring a public network access rule that allows all Azure services does not address authentication for pulling a private image; it only controls network access, not identity-based authorization.

106
Multi-Selecthard

A build agent VM is recreated from image every night. The OS can be lost on reimage, but build caches and artifacts must persist across rebuilds. The team also wants the cheapest OS storage option that supports this pattern. Which two choices should you make? Select two.

Select 2 answers
A.Use an ephemeral OS disk.
B.Place build caches and artifacts on a separate managed data disk.
C.Use a Premium SSD OS disk so the reimage is preserved.
D.Store the caches only on the temporary resource disk.
E.Use an availability set to make the OS disk persistent.
AnswersA, B

An ephemeral OS disk is the cheapest OS storage choice for a VM that can be recreated from image often. It is acceptable here because the scenario explicitly says the OS can be lost on reimage.

Why this answer

An ephemeral OS disk uses the local VM storage or temp SSD, which is destroyed when the VM is deallocated or reimaged. This matches the requirement that the OS can be lost on reimage. Option B is correct because placing build caches and artifacts on a separate managed data disk ensures they persist independently of the OS disk lifecycle; data disks are not affected by OS reimaging and can be reattached to the new VM instance.

Exam trap

The trap here is that candidates often confuse the temporary resource disk (which is also ephemeral) with a managed data disk, or assume that Premium SSD or availability sets provide persistence, when in fact only a separate managed data disk ensures data survives OS reimaging.

Why the other options are wrong

C

Premium SSD OS disks persist data across VM recreations, but the question requires the cheapest OS storage option that supports nightly reimaging. Ephemeral OS disks are free and discard OS changes on deallocation, meeting the cost and reimage pattern requirements.

D

The temporary resource disk is not persistent; its contents are lost when the VM is reimaged or redeployed, so build caches and artifacts would not survive nightly rebuilds.

E

An availability set ensures VM availability during maintenance or failures, but does not make the OS disk persistent. The OS disk is still subject to reimaging, so caches and artifacts would be lost.

107
MCQeasy

You are creating a new Ubuntu VM and want it to create a local admin account and install packages automatically on the first boot. Which approach should you use?

A.Use an availability set so the script runs during placement.
B.Use cloud-init to run first-boot configuration in Linux.
C.Use a snapshot of the operating system disk.
D.Use a custom image and manually log in later.
AnswerB

cloud-init is the standard Linux first-boot provisioning tool, supported natively by Azure. By supplying a cloud-init script (in YAML or shell) at VM creation, you can automate creating local users with SSH keys, installing packages, running arbitrary commands, and applying system settings automatically on the first boot—before the OS is fully available for login. This directly fulfills the requirement to create a local user and configure the VM without manual intervention, making it the correct option.

Why this answer

Cloud-init is the standard method for automating first-boot configuration on Linux VMs in Azure. It processes user-data (such as cloud-config YAML) to create users, install packages, and run scripts during initial boot, making it the correct choice for creating a local admin account and installing packages automatically.

Exam trap

The trap here is that candidates may confuse availability sets with orchestration features or assume snapshots can trigger automation, missing that cloud-init is the Azure-native solution for first-boot configuration in Linux.

Why the other options are wrong

A

An availability set ensures high availability by distributing VMs across fault and update domains, but it does not execute scripts or automate first-boot configuration.

D

Manually logging in later does not automate the creation of a local admin account or package installation on first boot; cloud-init is designed for that purpose.

108
Multi-Selecthard

A development team wants to publish an internet-facing application directly from source code. The solution must support built-in HTTPS, deployment slots for safe testing, and autoscale as demand changes. Which two choices should the administrator select? Select two.

Select 2 answers
A.Use Azure App Service.
B.Choose an App Service plan at Standard tier or higher.
C.Use Azure Container Instances for the public application.
D.Deploy the app on a virtual machine scale set.
E.Use an availability set for the application instances.
AnswersA, B

Azure App Service is a fully managed PaaS offering specifically built for hosting internet-facing web applications. It provides automatic OS patching, built-in load balancing, TLS/SSL termination, source-control integration, and health checking, so the development team does not have to provision or maintain any underlying VMs. This makes it the correct platform choice for a public web app that requires deployment slots and autoscale functionality.

Why this answer

Azure App Service is a fully managed platform for building, deploying, and scaling web apps. It natively supports publishing directly from source code (via continuous deployment from GitHub, Azure Repos, or Bitbucket), built-in HTTPS (with automatic certificate management), deployment slots for staging and swapping, and autoscale based on metrics or schedules. These features directly satisfy all the requirements stated in the question.

Exam trap

The trap here is that candidates often confuse Azure Container Instances or virtual machine scale sets as simpler alternatives, but they lack the integrated deployment slots and built-in HTTPS management that App Service provides out of the box.

Why the other options are wrong

C

Azure Container Instances does not provide built-in HTTPS, deployment slots, or autoscaling; it is designed for simple container workloads without these features.

D

Virtual machine scale sets require manual configuration of HTTPS, deployment slots, and autoscale rules, and do not support direct source code deployment with built-in HTTPS and deployment slots like App Service.

E

An availability set provides high availability for VMs within a datacenter but does not support built-in HTTPS, deployment slots, or autoscaling for internet-facing applications from source code.

109
MCQmedium

An operations team maintains a hardened Windows base image that includes patch baseline settings and monitoring agents. They need to publish new versions, replicate the image to another region, and deploy future VMs from the same controlled image source. What should they use?

A.A snapshot of the generalized OS disk.
B.An Azure Compute Gallery image version.
C.A VM extension on an existing VM.
D.An availability set for the image resources.
AnswerB

A Compute Gallery image version is the correct mechanism because it stores a fully generalized VM image as a managed, versioned resource. This lets you maintain multiple versions (e.g., quarterly patch baselines), replicate them to other Azure regions for faster or resilient deployment, and use any version as the source for thousands of identical VMs. It provides controlled rollback and a standardized, repeatable image distribution pipeline.

Why this answer

An Azure Compute Gallery (formerly Shared Image Gallery) is the correct service for managing, versioning, replicating, and deploying custom Windows images across regions. It supports multiple image versions, regional replication, and allows you to deploy VMs from a controlled, hardened base image. Snapshots alone lack versioning and cross-region replication capabilities.

Exam trap

The trap here is that candidates often confuse a simple snapshot or managed disk copy with the versioning, replication, and lifecycle management capabilities that only an Azure Compute Gallery provides.

Why the other options are wrong

A

A snapshot of the generalized OS disk does not support replication to another region or centralized version management for publishing new image versions. Azure Compute Gallery is required for multi-region replication and controlled image versioning.

C

A VM extension is used to configure software or agents on an existing VM, not to publish, replicate, or deploy new VM images from a controlled source.

D

An availability set is used to distribute VMs across fault and update domains for high availability, not for managing, versioning, or replicating custom images across regions.

110
Matchingeasy

Match each VM identity concept to its best use.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Best for one VM; the identity is deleted with the VM.

Can be attached to multiple VMs.

Lets an app get Azure tokens without storing secrets.

Grants permissions to an Azure resource at a chosen scope.

Why these pairings

Managed identities (system or user-assigned) eliminate credential management; Azure AD app identity is for custom apps; IMDS provides tokens; role assignments grant access to resources.

111
MCQmedium

A stateless web application is hosted on an Azure virtual machine scale set. Traffic is predictable: CPU usage stays below 20% overnight, then rises above 70% during business hours. The administrator wants the instance count to increase automatically when average CPU stays high for 10 minutes and to decrease after demand drops. What should be configured?

A.A proximity placement group for the scale set instances.
B.Manual scale operations only.
C.Autoscale rules on the virtual machine scale set.
D.An availability set with three update domains.
AnswerC

Autoscale rules on the virtual machine scale set correctly solve this. Azure VMSS can scale out and in automatically based on a metric such as average CPU percentage, with thresholds and duration windows. The autoscale engine reacts to the changing CPU pattern by adding or removing instances, and because the app is stateless, new instances can serve traffic immediately. This is the only option that provides the required automatic, metric-driven scaling.

Why this answer

Autoscale rules on the virtual machine scale set allow the administrator to define a scale-out condition (e.g., average CPU > 70% for 10 minutes) and a scale-in condition (e.g., average CPU < 20% for a specified duration). This matches the requirement for automatic, metric-based scaling based on predictable traffic patterns.

Exam trap

The trap here is that candidates may confuse availability sets or proximity placement groups with autoscaling, thinking they provide automatic instance count adjustments, when in fact they only address placement or fault tolerance.

Why the other options are wrong

A

A proximity placement group reduces network latency between VMs but does not provide automatic scaling based on CPU usage, which is required to handle the predictable traffic pattern described.

B

Manual scaling requires an administrator to manually change the instance count, which does not meet the requirement for automatic scaling based on CPU thresholds.

D

An availability set with three update domains is used to ensure high availability for VMs during planned maintenance, not for autoscaling based on CPU usage. It does not provide automatic scaling of instance count.

112
MCQeasy

Based on the exhibit, a stateless web app must add VM instances during business hours and remove them at night based on CPU usage. Which Azure service should the administrator deploy?

A.An availability set with two virtual machines.
B.An Azure virtual machine scale set.
C.A single Azure VM with a larger size.
D.A recovery services vault.
AnswerB

A virtual machine scale set is designed for identical VM instances that can scale out and scale in automatically. It works well for stateless workloads, and autoscale rules can use CPU thresholds or schedules to adjust capacity over time. This exactly matches the requirement for business-hour scaling.

Why this answer

An Azure virtual machine scale set (VMSS) is the correct choice because it automatically scales the number of VM instances in or out based on CPU usage metrics, and it supports scheduled scaling to add instances during business hours and remove them at night. This aligns with the stateless web app requirement for elastic, automated scaling without manual intervention.

Exam trap

The trap here is that candidates often confuse availability sets (which provide high availability) with scale sets (which provide autoscaling), leading them to pick Option A for a scenario that explicitly requires dynamic scaling based on load and schedule.

Why the other options are wrong

A

An availability set provides high availability for a fixed number of VMs, but does not support automatic scaling based on CPU usage or schedule. It cannot add or remove instances dynamically.

D

A Recovery Services vault is used for backup and disaster recovery, not for scaling VM instances based on CPU usage or scheduling.

113
MCQeasy

A developer wants to publish an internet-facing web application from source code. The solution must support built-in HTTPS, deployment slots for testing, and autoscale. The team does not want to manage servers. Which Azure service should the administrator recommend?

A.Azure App Service
B.Azure Container Instances
C.Azure Virtual Machine Scale Sets
D.Azure Bastion
AnswerA

Azure App Service is designed for hosting web applications and APIs with minimal infrastructure management. It supports built-in TLS/HTTPS, deployment slots for staging and swap testing, and autoscale for changing demand. Those features make it a strong fit for internet-facing applications that need operational simplicity and common web hosting capabilities without managing virtual machines.

Why this answer

Azure App Service is the correct choice because it provides a fully managed platform for hosting web applications from source code, with built-in support for HTTPS via TLS/SSL certificates, deployment slots for staging and testing, and autoscale capabilities. It eliminates server management, aligning with the requirement for a PaaS (Platform as a Service) solution that handles infrastructure, patching, and scaling automatically.

Exam trap

The trap here is that candidates often confuse Azure Container Instances with Azure App Service for web apps, overlooking that Container Instances lacks built-in deployment slots and autoscale for web applications, and requires additional orchestration for HTTPS and scaling.

Why the other options are wrong

B

Azure Container Instances does not provide built-in HTTPS, deployment slots, or autoscale; it is a serverless container platform without these web app-specific features.

C

Azure Virtual Machine Scale Sets require managing VMs and do not natively support built-in HTTPS or deployment slots; they also lack the platform-as-a-service simplicity for deploying from source code without server management.

D

Azure Bastion is a service for secure RDP/SSH access to virtual machines, not for hosting web applications. It does not support HTTPS, deployment slots, or autoscale for web apps.

114
MCQeasy

Based on the exhibit, which Azure compute service should you deploy for a stateless web app that needs more instances during business hours and fewer at night?

A.A single larger virtual machine.
B.A virtual machine scale set with autoscale rules.
C.An availability set with two VMs.
D.A dedicated host with one VM per host.
AnswerB

A virtual machine scale set is the right choice because it can run multiple identical instances and scale them automatically when demand changes. The exhibit shows predictable workload spikes, and the app is stateless, so instances can be added or removed without affecting user sessions.

Why this answer

A virtual machine scale set with autoscale rules is the correct choice because it automatically adjusts the number of VM instances based on demand, scaling out during business hours and scaling in at night. This matches the stateless web app requirement, as scale sets are designed for stateless workloads where instances can be added or removed without data loss.

Exam trap

The trap here is that candidates often confuse availability sets (high availability) with autoscaling, or think a single large VM can handle variable load by resizing, but autoscaling requires horizontal scaling via VMSS.

Why the other options are wrong

A

A single larger virtual machine cannot scale out to meet variable demand; it only scales up (increase size), which does not automatically adjust instance count based on time or load.

C

An availability set with two VMs provides high availability but does not automatically scale instances based on time or load; it cannot increase or decrease instances to match business hours.

D

A dedicated host provides physical isolation and dedicated resources for compliance or licensing needs, but it does not offer autoscaling to adjust instances based on time-of-day demand. The question requires a solution that scales instances up during business hours and down at night, which a dedicated host cannot achieve.

115
MCQmedium

A build pipeline starts a containerized data-processing job every evening. Each run finishes in under 20 minutes, does not need persistent servers, and never receives inbound traffic. Which compute service best fits this workload?

A.Azure App Service
B.Azure Container Instances
C.Azure Virtual Machines
D.Azure Kubernetes Service
AnswerB

Azure Container Instances is the correct choice because it runs containers on-demand without requiring any underlying infrastructure provisioning or cluster orchestration. It starts in seconds, charges only for the duration of the job, and is purpose-built for short-lived, isolated workloads like this data processing pipeline. This serverless model eliminates the need to manage VMs, nodes, or Kubernetes control planes, giving a simple and cost-effective execution environment.

Why this answer

Azure Container Instances (ACI) is the best fit because it allows you to run a containerized job directly in Azure without provisioning or managing any underlying infrastructure. The workload is short-lived (under 20 minutes), requires no persistent servers, and has no inbound traffic, which aligns perfectly with ACI's pay-per-second billing and ability to start containers on demand from a build pipeline.

Exam trap

The trap here is that candidates often choose Azure Kubernetes Service (D) because they associate containers with Kubernetes, overlooking that ACI is the simpler, more cost-effective solution for single, short-lived containerized jobs without orchestration needs.

Why the other options are wrong

A

Azure App Service is designed for hosting web applications and RESTful APIs that require continuous runtime and inbound HTTP traffic, not for short-lived, batch container jobs that finish in under 20 minutes and have no inbound requests.

C

Azure Virtual Machines require persistent servers, incurring costs even when idle, and need manual scaling or additional services for orchestration, making them unsuitable for a short-lived, serverless containerized job that runs under 20 minutes.

D

Azure Kubernetes Service (AKS) is overkill for a short-lived batch job that finishes in under 20 minutes, as it requires a cluster with nodes running continuously, incurring cost and management overhead. The workload does not need orchestration, scaling, or persistent servers.

116
Multi-Selectmedium

You are designing a containerized application deployment in Azure. Which three options must you consider when choosing between Azure Container Instances (ACI) and Azure Kubernetes Service (AKS)? (Choose three.)

Select 3 answers
.ACI is ideal for simple, short-lived tasks or burst workloads that do not require orchestration.
.AKS provides built-in auto-scaling, service discovery, and rolling update capabilities.
.ACI supports mounting an Azure Files share as a persistent volume.
.AKS supports only Linux-based container images and cannot run Windows containers.
.ACI automatically manages container orchestration, including load balancing and scaling across nodes.
.AKS requires you to manage the underlying virtual machine infrastructure, including patching the OS.

Why this answer

ACI is correct because it is designed for simple, short-lived tasks or burst workloads that do not require orchestration, making it ideal for scenarios like batch processing or event-driven applications. AKS is correct because it provides built-in auto-scaling, service discovery, and rolling update capabilities, which are essential for managing complex microservices architectures. ACI is correct because it supports mounting an Azure Files share as a persistent volume, enabling stateful workloads to share data across container instances.

Exam trap

The trap here is that candidates may confuse ACI's lack of orchestration with automatic orchestration, or assume AKS requires full VM management, when in fact AKS abstracts node management through managed node pools.

117
MCQeasy

You have already deployed a Windows Server VM. After provisioning, you need to run a PowerShell script once to configure an application and create a registry setting without logging in interactively. Which Azure feature should you use?

A.Custom Script Extension
B.cloud-init
C.Azure Policy
D.Recovery Services vault
AnswerA

This extension can download and run a script on a VM after deployment without requiring interactive logon.

Why this answer

The Custom Script Extension (CSE) is the correct choice because it allows you to run a PowerShell script on a Windows VM after provisioning, without requiring interactive logon. It executes the script as the local system account, making it ideal for one-time configuration tasks like setting registry keys or installing applications. This aligns with the requirement to run a script once non-interactively.

Exam trap

The trap here is that candidates often confuse cloud-init (a Linux-only tool) with the Custom Script Extension, mistakenly assuming cloud-init works on Windows VMs, or they think Azure Policy can execute scripts when it only evaluates and enforces policies.

Why the other options are wrong

B

cloud-init is designed for Linux VM initialization during first boot, not for Windows Server VMs, and it cannot run PowerShell scripts on Windows.

C

Azure Policy is used to enforce compliance rules and audit configurations across resources, not to execute scripts on a single VM after deployment.

D

Recovery Services vault is used for backup and disaster recovery (Azure Backup, Site Recovery), not for executing scripts on a VM after provisioning.

118
Multi-Selectmedium

A Linux VM deployed from a custom image shows only a black screen after reboot, and SSH never becomes available. The administrator needs to inspect the startup process without logging into the OS. Which two Azure features should be used? Select two.

Select 2 answers
A.Boot diagnostics
B.Azure Serial Console
C.Azure Site Recovery
D.VM application health extension
E.Azure Backup restore point
AnswersA, B

Boot diagnostics captures the VM's serial log output and host-side screenshots as the OS boots. When a custom Linux image only shows a blank screen, the captured console output reveals exactly where the boot fails—GRUB, kernel panic, missing drivers, or stuck on mounting a filesystem. This log is stored by Azure and can be retrieved from the portal or CLI even if the VM is unreachable. Therefore, it is the primary and most direct tool for observing the startup failure.

Why this answer

Boot diagnostics captures serial console output and screenshots of the VM during boot, allowing you to see kernel panics, driver failures, or bootloader errors even when the OS is unresponsive. Azure Serial Console provides a text-based console connection to the VM at the hypervisor layer, enabling interactive troubleshooting of the boot process (e.g., GRUB recovery, initramfs issues) without requiring network connectivity or SSH.

Exam trap

The trap here is that candidates confuse Azure Serial Console with SSH or RDP, assuming it requires the OS to be running, when in fact it works at the hypervisor level and is available even if the OS has not fully booted.

Why the other options are wrong

C

Azure Site Recovery is a disaster recovery service for replicating and failing over VMs, not for inspecting a VM's startup process or troubleshooting boot issues.

D

The VM application health extension monitors application health and enables automatic repairs, but it does not provide out-of-band access to the OS startup process or console output, which is needed to diagnose a black screen and SSH failure.

E

Azure Backup restore point is used for recovering VM data from backups, not for inspecting the startup process or troubleshooting boot issues without OS access.

119
MCQeasy

An administrator needs to deploy a VM quickly using the same hardened operating system image that was approved by the security team. What should the administrator use as the source for the new VM?

A.A managed image
B.A network interface
C.A resource lock
D.A public IP address
AnswerA

A managed image captures the OS disk configuration of a prepared VM and can be used as the source for creating new VMs. It is a common way to standardize deployments when the organization has an approved build with hardening already applied. This supports quick and consistent provisioning.

Why this answer

A managed image captures a fully configured, hardened OS disk (including installed software and settings) as a reusable snapshot. When deploying a new VM, specifying this managed image as the source ensures the VM boots with the exact, security-approved OS configuration, meeting the requirement for a quick, consistent deployment.

Exam trap

The trap here is that candidates may confuse a managed image with a snapshot or a VHD, but a managed image is the correct source for deploying a new VM with a specific OS configuration, while a snapshot is used for backup or disk cloning, not direct VM creation.

Why the other options are wrong

B

A network interface is a virtual network adapter that provides connectivity, not a source for deploying a VM's operating system image. It cannot serve as a hardened OS image.

C

A resource lock prevents accidental deletion or modification of a resource, but it cannot serve as a source image for deploying a VM. The question requires a source for the VM's operating system, which a resource lock does not provide.

D

A public IP address is a network resource that provides internet connectivity to a VM, not an operating system image. It cannot be used as a source to deploy a VM with a specific hardened OS image.

120
MCQmedium

Administrators need to manage Linux virtual machines that do not have public IP addresses. They want to connect from a browser without installing a VPN client. Which Azure service should they use?

A.Azure Bastion
D.Private endpoint
AnswerA

Azure Bastion is a fully managed PaaS service that provides secure, seamless RDP and SSH access to virtual machines directly through the Azure portal over TLS. Because it connects to the VM's private IP address, no public IP address or inbound internet-facing rule is required on the VM's NSG, eliminating the need for a VPN client or a jump box. It also supports session monitoring, multi-factor authentication (via Azure AD integration), and is deployed in a dedicated AzureBastionSubnet, making it the correct service for interactive browser-based administrative access.

Why this answer

Azure Bastion provides secure, seamless RDP/SSH connectivity to virtual machines directly from the Azure portal over TLS, without requiring public IP addresses or a VPN client. It uses a browser-based HTML5 client, making it ideal for administrators who need to manage Linux VMs without exposing them to the internet or installing additional software.

Exam trap

The trap here is that candidates often confuse Azure Bastion with VPN Gateway, assuming a VPN is required for private VM access, but Bastion eliminates the need for a VPN client by providing browser-based connectivity directly through the Azure portal.

Why the other options are wrong

B

VPN Gateway requires a VPN client on the browser machine and typically assigns public IPs to the gateway, not directly connecting to VMs without public IPs. It also does not provide browser-based connectivity.

C

Azure Load Balancer distributes network traffic across multiple VMs but does not provide browser-based RDP/SSH connectivity without a public IP or VPN client.

D

Private endpoint provides secure connectivity to Azure services over a private IP address, but it does not enable browser-based RDP/SSH connectivity without a VPN client. The question requires a service that allows browser access to VMs without public IPs, which Azure Bastion provides.

121
Multi-Selecteasy

An administrator wants future VMs to start from the same approved server build as an existing generalized VM. Which two image sources can be used to create the new VM? Select two.

Select 2 answers
A.A managed image created from the approved server build.
B.An image stored in Azure Compute Gallery.
C.A Marketplace image from the operating system vendor.
D.A single managed disk snapshot.
E.A public IP address assigned to the VM.
AnswersA, B

A managed image captures a generalized VM that has been prepared with tools like Sysprep (Windows) or waagent -deprovision (Linux), removing machine-specific identifiers and state. This image is stored as a managed resource and can be used repeatedly to deploy new VMs with the exact approved server build, ensuring consistent configuration, patching, and security baselines across the fleet.

Why this answer

A managed image captures the exact configuration of a generalized VM, including the OS and data disks, and can be used to deploy multiple identical VMs. This ensures that future VMs start from the same approved server build without needing to recreate the image each time.

Exam trap

The trap here is that candidates often confuse a single disk snapshot with a managed image, not realizing that a snapshot lacks the VM configuration and multiple disk support required to replicate the full approved build.

Why the other options are wrong

C

A Marketplace image is a pre-configured image from a vendor, not a custom image created from the approved server build. The question requires using the same approved server build, which must be a custom image, not a generic Marketplace image.

D

A single managed disk snapshot cannot be used to create a new VM with the same approved server build because it lacks the necessary OS and disk configuration metadata that a managed image provides. Snapshots are point-in-time copies of a disk, not deployable images.

E

A public IP address is a networking resource, not an image source. It cannot be used to create a VM from a specific server build.

122
MCQeasy

A customer-facing application runs on two Azure VMs. The business wants the application to stay available even if one datacenter in the Azure region has an outage. Which availability option should the administrator use?

A.Availability set
B.Availability zones
C.Proximity placement group
AnswerB

Availability zones place resources in physically separate datacenters within the same Azure region. That gives the application protection against a full datacenter failure, which is the scenario described. When the workload must survive a zone outage, zones are the right resiliency choice rather than a same-datacenter availability set.

Why this answer

Availability Zones are physically separate datacenters within an Azure region, each with independent power, cooling, and networking. By deploying the two VMs into different zones, the application remains available if one entire datacenter fails, meeting the requirement for datacenter-level fault tolerance.

Exam trap

The trap here is that candidates confuse Availability Sets (which protect against rack-level failures within one datacenter) with Availability Zones (which protect against full datacenter outages), leading them to choose the cheaper but insufficient option A.

Why the other options are wrong

A

Availability sets protect against rack-level failures within a single datacenter, not against an entire datacenter outage. They do not provide cross-datacenter redundancy.

C

Proximity placement groups reduce network latency by keeping VMs close together, but they do not protect against datacenter-level outages. The question requires resilience across datacenters, which proximity placement groups cannot provide.

D

Azure Load Balancer distributes traffic across VMs but does not protect against a datacenter outage within a region; it requires VMs in separate availability zones or regions to provide that resilience.

123
MCQhard

A new Windows VM must be deployed with an application installed, a configuration file copied from a storage account, and a bootstrap script run automatically after the operating system is provisioned. The operations team does not want to log in manually after deployment. What should they use?

A.A Custom Script Extension attached to the VM during provisioning.
B.Azure Bastion to connect through the browser and complete setup interactively.
C.A managed identity assigned to the VM without any extensions.
D.An availability set so the VM comes online faster during provisioning.
AnswerA

The Custom Script Extension is the standard Azure mechanism for automated post-deployment configuration. When attached during provisioning, it downloads and runs your PowerShell script (or Bash on Linux) as SYSTEM, allowing the application to be installed before the VM is marked ready. Unlike manual methods, it requires no interactive logon and is fully automatable via ARM templates, CLI, or PowerShell.

Why this answer

The Custom Script Extension (CSE) is the correct choice because it allows you to run a PowerShell or Bash script automatically after the VM is provisioned. This script can install applications, download configuration files from Azure Storage using a managed identity or SAS token, and execute bootstrap commands—all without any manual login. CSE is the standard Azure mechanism for post-deployment configuration automation on both Windows and Linux VMs.

Exam trap

The trap here is that candidates often confuse Azure Bastion (a connectivity tool) with an automation tool, or they assume a managed identity alone can run scripts, when in fact it only provides authentication and must be paired with an extension or custom code to perform actions.

Why the other options are wrong

B

Azure Bastion provides secure RDP/SSH access to VMs via the browser, but it requires manual login and interactive setup, which contradicts the requirement to avoid manual intervention after provisioning.

C

A managed identity alone provides authentication to Azure resources but does not execute scripts or install applications. The question requires automated deployment of an application, copying a configuration file, and running a bootstrap script, which a managed identity cannot perform without an extension like Custom Script Extension.

D

An availability set is used for high availability by distributing VMs across fault and update domains, not for automating software installation or configuration after provisioning.

124
Multi-Selecthard

A stateless customer portal runs on Azure VMs and must keep serving traffic if an entire datacenter in the region fails. The operations team also wants the portal to add and remove instances automatically during daily spikes without managing a Kubernetes cluster. Which two Azure compute capabilities should the administrator configure? Select two.

Select 2 answers
A.Deploy the portal instances across availability zones.
B.Use a virtual machine scale set with autoscale enabled.
C.Place the VMs in an availability set within a single datacenter.
D.Create a proximity placement group for the portal VMs.
E.Use a single larger VM with premium managed disks.
AnswersA, B

Availability zones are physically separate datacenters within an Azure region, each with independent power, cooling, and networking. By deploying the stateless portal instances across multiple zones, the application remains available even if an entire datacenter experiences an outage, because other zones continue to serve traffic. This configuration directly satisfies the requirement for high availability and should be paired with an Azure Load Balancer or Application Gateway to distribute requests across zone-redundant instances.

Why this answer

Availability zones protect against a full datacenter failure by distributing VM instances across physically separate datacenters within a region. This ensures that if one datacenter goes down, the portal continues serving traffic from the other zones. Combined with a load balancer, this provides high availability for stateless workloads.

Exam trap

The trap here is confusing availability sets (rack-level redundancy) with availability zones (datacenter-level redundancy), leading candidates to pick availability sets for a full datacenter failure scenario.

Why the other options are wrong

C

An availability set protects against rack-level failures within a single datacenter, not against an entire datacenter failure. The question requires resilience if a full datacenter fails, which availability sets cannot provide.

D

A proximity placement group reduces network latency between VMs but does not provide fault isolation across datacenters, so it cannot protect against an entire datacenter failure.

E

The question requires resilience across an entire datacenter failure and automatic scaling. A single larger VM with premium managed disks provides no redundancy—if the datacenter fails, the VM is lost—and does not support autoscaling to handle traffic spikes.

125
MCQeasy

Based on the exhibit, a workload must remain available even if one datacenter in an Azure region becomes unavailable. The region supports zone deployment. What should the administrator configure?

A.An availability set.
B.Availability zones.
C.A resource lock.
D.A user-defined route.
AnswerB

Availability zones place resources in separate physically isolated datacenters within the same region. If one datacenter becomes unavailable, the workload can continue running in another zone. That is the correct resilience option when the requirement explicitly calls for protection from a datacenter-level outage.

Why this answer

Availability zones are physically separate datacenters within an Azure region, each with independent power, cooling, and networking. Deploying the workload across two or more zones ensures that if one datacenter fails, the other zones continue to operate, maintaining availability. This directly meets the requirement of surviving a single datacenter outage within a region that supports zone deployment.

Exam trap

The trap here is that candidates often confuse availability sets (which protect against rack-level failures) with availability zones (which protect against entire datacenter failures), leading them to select the wrong answer when the question explicitly requires datacenter-level resilience.

Why the other options are wrong

A

An availability set protects against failures within a single datacenter (e.g., rack or hardware failure), not against the loss of an entire datacenter. The question requires resilience across datacenters, which availability sets cannot provide.

C

A resource lock prevents accidental deletion or modification of resources, but does not provide high availability or redundancy across datacenters. The question requires availability even if one datacenter fails, which resource locks cannot address.

D

User-defined routes (UDRs) control traffic flow between subnets or to on-premises networks, but they do not provide datacenter-level redundancy. The question requires availability even if one datacenter fails, which is achieved by distributing resources across availability zones, not by custom routing.

126
MCQmedium

You deploy several Windows virtual machines and need to install Microsoft Antimalware on each VM without logging on manually. What should you use?

A.An NSG application security group.
B.A VM extension.
C.A route table.
D.A blob lifecycle rule.
AnswerB

A VM extension is the Azure resource-managed mechanism that delivers post-deployment configuration and automation tasks directly inside a Windows guest OS, such as running scripts via Custom Script Extension or applying Desired State Configuration. When you deploy Windows VMs and need to install software or make server-level changes, a VM extension is a supported, idempotent option that Azure tracks in the VM model. Unlike network constructs, extensions execute in the guest and are the correct answer.

Why this answer

VM extensions are small applications that provide post-deployment configuration and automation tasks on Azure VMs. The Microsoft Antimalware extension can be deployed to multiple VMs at scale via Azure PowerShell, CLI, ARM templates, or policies, enabling silent installation without manual login.

Exam trap

The trap here is that candidates confuse network-level controls (NSGs, route tables) or storage management (lifecycle rules) with VM-level software deployment, overlooking that VM extensions are the dedicated Azure mechanism for post-deployment configuration and software installation.

Why the other options are wrong

A

An NSG application security group is used to group virtual machines for network security rule application, not for installing software or extensions on VMs.

C

A route table controls network traffic routing between subnets and networks, not software installation on VMs. It cannot deploy or manage applications like Microsoft Antimalware.

D

Blob lifecycle rules manage the tiering or deletion of blob data in Azure Storage, not the installation of software on virtual machines.

127
Multi-Selecthard

A Windows VM must install a monitoring agent, run a bootstrap script during provisioning, and download a configuration file from an Azure resource without storing any credentials in the script or on disk. Which two Azure compute features should the administrator use? Select two.

Select 2 answers
A.Use a Custom Script Extension to run the bootstrap actions after provisioning.
B.Assign a system-assigned managed identity to the virtual machine.
C.Enable boot diagnostics and review the serial console output.
D.Attach a read-only managed disk to store the configuration file.
E.Use an availability set to keep the bootstrap script highly available.
AnswersA, B

The Custom Script Extension is an Azure VM extension that lets you execute a configured script after the VM is provisioned. It can be delivered via ARM templates, Azure CLI, or PowerShell, and handles download, execution, and logging of the script. This is the standard mechanism for bootstrapping software installation, including monitoring agents, on Windows VMs, because it runs with the VM's local privileges and can be idempotent if written correctly.

Why this answer

The Custom Script Extension (CSE) is the correct Azure feature to run a bootstrap script after provisioning because it executes a script on the VM during or after deployment, enabling installation of the monitoring agent and other configuration tasks. It is the standard method for post-deployment automation on Azure VMs, and it can reference a script stored in Azure Storage or a public URL without embedding credentials.

Exam trap

The trap here is that candidates often confuse boot diagnostics (Option C) with a method to run scripts, or think that a managed disk (Option D) can replace the need for secure credential storage, when in fact the combination of managed identity and Custom Script Extension is the only secure, credential-free approach for post-deployment automation.

Why the other options are wrong

C

Boot diagnostics and serial console output are used for troubleshooting boot failures, not for installing agents or running scripts without credentials. They do not execute custom scripts or download files securely.

D

Attaching a read-only managed disk does not allow the VM to download a configuration file from an Azure resource without storing credentials; the disk itself is a storage resource that would require authentication to access, and it does not solve the credential storage problem.

E

An availability set provides high availability for VMs by distributing them across fault and update domains, but it does not execute scripts or manage credentials. It cannot run a bootstrap script or download a configuration file without storing credentials.

128
MCQeasy

Based on the exhibit, the administrator needs to deploy a VM quickly using a preapproved hardened operating system image. Which source should be used when creating the VM?

A.An approved custom image in an Azure Compute Gallery.
B.A temporary public IP address.
C.A network security group rule.
D.An Azure Monitor alert rule.
AnswerA

A custom image in an Azure Compute Gallery lets the team standardize VM deployments on a hardened, approved operating system image. It is the right source when the same validated image should be reused consistently for new VMs. This supports repeatability and compliance across deployments.

Why this answer

An approved custom image in an Azure Compute Gallery (formerly Shared Image Gallery) is the correct source because it allows the administrator to deploy a VM quickly using a preapproved, hardened operating system image. The Azure Compute Gallery provides versioning, replication, and regional distribution of custom images, ensuring that the hardened OS is readily available for rapid deployment across multiple regions. This aligns with the requirement for a preapproved image that meets security and compliance standards.

Exam trap

The trap here is that candidates may confuse a VM image source with networking or monitoring components, mistakenly thinking a public IP or NSG rule can serve as an image source, when in fact only a compute gallery or managed image provides the OS disk definition.

Why the other options are wrong

B

A temporary public IP address is a networking resource, not a VM source image. It cannot provide an operating system image for VM deployment.

C

A network security group (NSG) rule controls inbound/outbound traffic to a VM, not the source image used to create the VM. The question asks for a source image, not a network configuration.

D

An Azure Monitor alert rule is used to monitor metrics or logs and trigger actions, not to provide a source image for VM creation.

129
Multi-Selecthard

A Windows VM must run a bootstrap script during provisioning to install a monitoring agent and write configuration files. The administrator does not want to log in interactively, and the script must be runnable again after the VM is rebuilt. Which two Azure compute components should be used? Select two.

Select 2 answers
A.Azure VM Agent
B.Custom Script Extension
C.Boot diagnostics
D.Availability zone
E.Ephemeral OS disk
AnswersA, B

The Azure VM Agent (WindowsAzure Guest Agent) is the core runtime that runs inside the VM and is responsible for managing extension execution, reporting VM health, and handling provisioning actions for Azure. Without this agent, Azure cannot deliver or run any extensions, including the Custom Script Extension, so it is an essential prerequisite for running a bootstrap script during provisioning. It enables secure communication between the VM and the Azure fabric controller, allowing the platform to execute scripts and configurations on the instance.

Why this answer

The Azure VM Agent (A) is required because it enables the VM to run extensions, including the Custom Script Extension. The Custom Script Extension (B) is the correct mechanism to execute the bootstrap script during provisioning without interactive login, and it can be reapplied to a rebuilt VM by redeploying the same ARM template or CLI command.

Exam trap

The trap here is that candidates confuse Boot diagnostics (which only shows logs) with a tool that can run scripts, or they mistakenly think Ephemeral OS disks or Availability zones are involved in script execution, when in fact only the VM Agent and Custom Script Extension provide the required automation.

Why the other options are wrong

D

Availability zones are a high-availability feature that protects VMs from datacenter failures, not a compute component for running scripts during provisioning.

130
MCQeasy

Before changing a production VM's data disk, you want a point-in-time copy that can be restored later without affecting the VM. What should you create?

A.Snapshot
B.Availability set
C.Azure Policy assignment
D.Virtual network peering
AnswerA

A snapshot of a managed disk captures the disk state at a specific point in time, storing only the changes (incremental) or a full copy depending on type. It can be used to create a new managed disk or restore the original disk, making it ideal before modifications like resizing or changing a data disk.

Why this answer

A snapshot captures a point-in-time, read-only copy of a managed or unmanaged disk. It can be used to create a new disk or restore the original disk without affecting the running VM, making it the correct choice for a non-disruptive backup before a data disk change.

Exam trap

The trap here is that candidates may confuse a snapshot with a backup vault or recovery services vault, but the question specifically asks for a point-in-time copy that does not affect the running VM, and only a snapshot meets that requirement without requiring a backup policy or agent.

Why the other options are wrong

B

An availability set is a logical grouping of VMs to ensure high availability during platform updates and failures; it does not provide point-in-time copies of disks.

C

Azure Policy assignment enforces compliance rules on resources, but it does not create a point-in-time copy of a disk. It cannot be used to restore a VM's data disk to a previous state.

D

Virtual network peering connects two virtual networks, enabling traffic between them. It does not create a point-in-time copy of a data disk or provide any backup/restore capability for VM disks.

131
Matchingeasy

Match each Azure VM deployment concept to the description that best fits it.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Spreads VMs across fault and update domains within one datacenter.

Places VMs in separate datacenters within the same Azure region.

Reusable source for creating the same VM build again.

Defines CPU, memory, and temporary storage resources.

Why these pairings

VMSS provides auto-scaling identical VMs; Availability Set groups VMs for redundancy; Availability Zone offers physical separation; Managed Disk is persistent block storage; Azure Bastion provides secure remote access; Dedicated Host gives single-tenant physical servers.

132
MCQmedium

A managed data disk on a VM was deleted by mistake. You have a snapshot from before the deletion and want to restore the data with minimal impact to the VM's operating system disk. What should you do?

A.Create a new managed disk from the snapshot and attach it to the VM
B.Redeploy the VM from the marketplace image
C.Convert the snapshot directly into an OS disk and boot from it
D.Resize the VM to a larger size and the deleted disk will reappear
AnswerA

A managed-disk snapshot is a point-in-time read-only copy of the original data disk. To recover the deleted data disk, you create a new managed disk from that snapshot (specifying the same or larger size and the appropriate storage type) and then attach it to the VM as a data disk. This restores all file contents without re-creating the VM and leaves the existing OS disk untouched, so the VM's identity, name, and attached resources remain consistent.

Why this answer

You can create a new managed disk from the snapshot and attach it as a data disk to the existing VM. This restores the data without affecting the OS disk or requiring a VM redeployment, minimizing downtime and impact.

Exam trap

The trap here is that candidates may confuse snapshots with OS disk recovery options, incorrectly assuming a data disk snapshot can be used to boot the VM, or that resizing or redeploying the VM will restore deleted disks.

Why the other options are wrong

B

Redeploying the VM from a marketplace image would replace the entire OS disk with a fresh image, losing all data and customizations, and does not restore the deleted data disk.

C

Converting a snapshot into an OS disk and booting from it would replace the VM's operating system disk, causing significant disruption and potential data loss on the OS disk, whereas the question asks to restore a data disk with minimal impact to the OS disk.

D

Resizing a VM does not recover deleted disks; disks are independent resources and must be recreated from snapshots or backups.

133
Multi-Selectmedium

Which three of the following statements about Azure App Service plans are correct? (Choose three.)

Select 3 answers
.Apps in the same App Service plan share the same compute resources, even if they are in different resource groups.
.You can scale out an App Service plan independently of the apps running within it.
.The Isolated tier provides network isolation and is designed for apps that require high security and scaling.
.Changing the pricing tier of an App Service plan always causes downtime for all apps in the plan.
.An App Service plan can only contain apps from the same region and the same resource group.
.The Free and Shared tiers support custom domain names and SSL binding without additional cost.

Why this answer

Apps in the same App Service plan share the same compute resources (VMs, memory, CPU) because the plan defines the underlying infrastructure. This is true even if the apps are in different resource groups, as the plan is the boundary for resource allocation, not the resource group.

Exam trap

The trap here is that candidates often assume apps must be in the same resource group to share resources, but Azure App Service plans are resource-group-agnostic for compute sharing, and they also mistakenly think Free/Shared tiers include custom domains and SSL, which they do not.

134
MCQeasy

After a Windows VM is created, the administrator wants IIS installed and a configuration script run automatically without signing in to the server. Which Azure feature should be used?

A.An availability set
B.A virtual machine extension
C.An Azure Policy assignment
D.A network security group rule
AnswerB

A VM extension is designed to run additional configuration tasks on a VM after deployment. For example, the Custom Script Extension can install software, copy files, or execute scripts without an interactive logon. This directly matches the requirement to automate IIS installation and post-deployment configuration.

Why this answer

A virtual machine extension (such as the Custom Script Extension for Windows) allows you to deploy and run scripts on an Azure VM after provisioning, without requiring any interactive sign-in. This is the correct Azure feature to automatically install IIS and execute a configuration script as part of the VM deployment or post-deployment automation.

Exam trap

The trap here is that candidates often confuse Azure Policy (which only audits or enforces configurations) with VM extensions (which actually perform software installation and script execution), leading them to select Azure Policy as the automation tool.

Why the other options are wrong

A

An availability set provides high availability for VMs by distributing them across fault and update domains, but it does not automate software installation or configuration after VM creation.

C

Azure Policy assignments enforce compliance rules on resources, but they cannot install software or run scripts on a VM. They are used for governance, not post-deployment configuration.

D

A network security group rule controls inbound/outbound traffic to/from a VM, not the installation or configuration of software like IIS. It cannot run scripts or install applications.

135
MCQhard

Your company hosts an internal web app in Azure App Service. Access must be limited to users connecting from the corporate virtual network over private IP addresses only. What should you configure?

A.An App Service Environment only.
B.Access restrictions based on public IP ranges only.
C.A private endpoint for the web app.
D.A public load balancer in front of the web app.
AnswerC

A private endpoint for the web app is the correct solution because it assigns the App Service a private IP address from your virtual network, enabling direct and secure access without traversing the public internet. When configured with the 'Deny public access' option, the public endpoint is removed entirely, leaving only the private route from your VNet. This gives you the precise control over connectivity you need while keeping the existing App Service plan.

Why this answer

A private endpoint assigns a private IP address from your virtual network to the web app, making it accessible only over the corporate network via private IPs. This ensures traffic never traverses the public internet, meeting the requirement for private IP-only access.

Exam trap

The trap here is that candidates often confuse access restrictions (which filter by public IP) with private endpoint (which eliminates public exposure entirely), mistakenly thinking IP-based restrictions can enforce private-only access when they cannot prevent internet routing.

Why the other options are wrong

A

An App Service Environment (ASE) is not required to limit access to private IPs; a private endpoint on a standard App Service can achieve this without the cost and complexity of an ASE.

B

Access restrictions based on public IP ranges only allow filtering by public IP addresses, not private IP addresses from a virtual network. The question requires limiting access to users connecting from the corporate virtual network over private IP addresses, which cannot be achieved with public IP ranges.

D

A public load balancer distributes traffic to the web app over the internet, not restricting access to private IP addresses from the corporate virtual network. It does not enforce private connectivity.

136
MCQhard

A platform team has a hardened Windows Server VM that was generalized after patching, agent installation, and baseline configuration. They must deploy the same build to development, test, and production subscriptions, and they want a controlled way to publish newer versions later without rebuilding the image each time. What should they create first?

A.An availability set for the source VM so new virtual machines inherit the same configuration.
B.A managed disk snapshot of the OS disk so new VMs can be created from the captured state.
C.An Azure Compute Gallery image version based on the generalized VM image.
D.A proximity placement group so all future VMs land close to the current server.
AnswerC

Azure Compute Gallery is the best fit when you need a reusable, versioned VM image that can be deployed consistently across subscriptions and regions. It supports image publishing, replication, and controlled updates, which makes it ideal for a hardened base build that will evolve over time.

Why this answer

An Azure Compute Gallery (formerly Shared Image Gallery) allows you to store and manage multiple versions of a generalized VM image, enabling controlled, incremental publishing of image updates across subscriptions. By creating an image version in a gallery, the team can deploy the same build to dev, test, and prod subscriptions while maintaining versioning and replication control, avoiding the need to rebuild the image from scratch for each update.

Exam trap

The trap here is that candidates often confuse a managed disk snapshot (Option B) with a reusable, versionable image, not realizing that snapshots lack the versioning, replication, and cross-subscription sharing capabilities that an Azure Compute Gallery image version provides.

Why the other options are wrong

A

An availability set ensures high availability by distributing VMs across fault domains, but it does not capture or replicate a generalized VM image across subscriptions for controlled versioned deployments.

B

A managed disk snapshot captures a point-in-time copy of the OS disk, but it does not support versioning, replication across regions, or controlled publishing of updates. The question requires a solution for deploying the same build to multiple subscriptions with future version management, which Azure Compute Gallery provides.

D

A proximity placement group ensures VMs are physically close for low latency, but does not provide image versioning or controlled publishing across subscriptions.

137
MCQeasy

An application on an Azure VM has outgrown its current CPU and memory. The administrator wants to increase compute capacity without rebuilding the application or changing the VM image. What should be done?

A.Resize the virtual machine to a larger size
B.Create a new snapshot of the OS disk
C.Move the VM to an availability set
D.Attach a data disk
AnswerA

Resizing the VM changes the amount of CPU, memory, and sometimes other capabilities assigned to the existing machine. This is the correct operational fix when the application needs more compute resources but does not need a new image or rebuild. It keeps the same VM and operating system while giving it more capacity. For an easy Azure administration scenario, this is the direct answer to a performance-capacity problem.

Why this answer

Resizing the VM to a larger size (Option A) directly increases the CPU and memory resources allocated to the VM without requiring any changes to the application or the underlying OS disk image. Azure allows you to change the VM size as long as the new size is available in the current hardware cluster and the VM is deallocated (stopped) first. This is the simplest and most appropriate method to scale up compute capacity while preserving the existing configuration and data.

Exam trap

The trap here is that candidates often confuse scaling compute resources with adding storage or improving availability, leading them to select options like attaching a data disk or moving to an availability set, which do not address CPU/memory constraints.

How to eliminate wrong answers

Option B is wrong because creating a new snapshot of the OS disk captures a point-in-time backup of the disk, but it does not increase the CPU or memory resources of the running VM. Option C is wrong because moving the VM to an availability set improves redundancy and fault tolerance by distributing VMs across fault domains, but it does not change the compute capacity (CPU/memory) of the individual VM. Option D is wrong because attaching a data disk adds additional storage capacity to the VM, not CPU or memory; it does not address the performance bottleneck caused by insufficient compute resources.

138
MCQeasy

A company hosts a stateless web application behind a load balancer. Traffic increases during the day and drops at night. The team wants Azure to automatically add or remove identical VM instances based on demand. What should the administrator deploy?

A.A single large virtual machine
B.A virtual machine scale set
C.An availability set
D.A managed image
AnswerB

A virtual machine scale set is designed for deploying and managing multiple identical VMs as a group. It supports autoscaling rules so Azure can add or remove instances based on metrics such as CPU usage or scheduled demand. This is the best fit for a stateless web workload with changing traffic.

Why this answer

A virtual machine scale set (VMSS) is the correct choice because it automatically manages a group of identical, load-balanced VMs and can scale out (add VMs) or scale in (remove VMs) based on demand metrics like CPU usage or a schedule. This matches the requirement for a stateless web application with variable traffic, as VMSS integrates with Azure Load Balancer or Application Gateway and supports autoscale rules to handle daytime spikes and nighttime drops without manual intervention.

Exam trap

The trap here is that candidates often confuse an availability set (which provides high availability) with a scale set (which provides elasticity), leading them to pick Option C because they think 'automatic addition/removal' means fault tolerance, not scaling.

Why the other options are wrong

A

A single large VM cannot automatically scale out/in based on demand; it lacks the elasticity to add or remove instances dynamically.

C

An availability set provides high availability by distributing VMs across fault and update domains, but it does not support automatic scaling based on demand. The question requires automatic addition/removal of instances, which availability sets cannot do.

D

A managed image is a static template for creating VMs, not a scaling solution. It cannot automatically add or remove instances based on demand; it only provides a consistent configuration for manual or automated VM creation.

139
MCQeasy

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?

A.Use an availability set so the VM runs the initialization tasks during host placement.
B.Use cloud-init in the VM creation settings to perform first-boot configuration.
C.Use an Azure Policy assignment to install the packages after deployment.
D.Use a managed disk snapshot and attach it to the VM after deployment.
AnswerB

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.

Why this answer

B is correct because cloud-init is the standard, native mechanism for performing first-boot configuration on Linux VMs in Azure. It allows you to inject a configuration file (e.g., YAML or shell script) during VM creation that automatically creates users, installs packages, and runs custom commands on the first boot, without requiring any post-deployment scripts or manual intervention.

Exam trap

The trap here is that candidates confuse Azure Policy (a governance tool) with a configuration management tool like cloud-init or Desired State Configuration (DSC), assuming Policy can execute scripts inside a VM when it only enforces resource-level rules.

Why the other options are wrong

A

An availability set is used for high availability by distributing VMs across fault domains, not for executing initialization tasks like creating users or installing packages.

C

Azure Policy is used to enforce compliance rules across resources, not to execute first-boot configuration scripts or install packages on a VM. It cannot run commands inside a VM after deployment.

D

A managed disk snapshot captures the disk state at a point in time but does not execute first-boot configuration tasks like creating users or installing packages; it simply clones the disk content.

140
MCQhard

A Windows VM must install IIS after provisioning and then run a script that registers the server with an internal API by using the VM's managed identity. The same steps must run automatically whenever the VM is deployed from Bicep. What should be added to the deployment?

A.A read-only resource lock on the VM resource group
B.A Custom Script Extension on the VM
C.An availability set containing the VM
D.A proximity placement group for the VM
AnswerB

The Custom Script Extension is an Azure VM extension that executes a provided PowerShell script after the VM is provisioned, making it the correct choice for installing IIS and running post-deployment tasks. You can deploy it via Azure PowerShell, CLI, or an ARM template, and it supports idempotent execution patterns, enabling you to bootstrap the OS with exactly the required roles and features.

Why this answer

The Custom Script Extension (CSE) is the correct choice because it allows you to run PowerShell or Bash scripts on an Azure VM after provisioning, enabling the installation of IIS and execution of a registration script that leverages the VM's managed identity. Since the requirement specifies that these steps must run automatically whenever the VM is deployed from Bicep, the CSE can be declared as a resource in the Bicep template, ensuring it executes on every deployment. This directly addresses the need for post-deployment configuration without manual intervention.

Exam trap

The trap here is that candidates often confuse resource locks or availability sets with automation capabilities, mistakenly thinking they can trigger scripts, when in reality only extensions like Custom Script Extension or Desired State Configuration can perform post-deployment configuration tasks.

Why the other options are wrong

A

A read-only resource lock prevents any modifications to the VM resource group, including the Custom Script Extension needed to install IIS and run the registration script. It does not automate post-deployment configuration.

C

An availability set provides high availability for VMs by distributing them across fault and update domains, but it does not execute scripts or install software after provisioning. It cannot automate IIS installation or managed identity registration.

D

A proximity placement group reduces network latency between VMs but does not install IIS or run scripts; it has no role in post-deployment configuration or managed identity usage.

141
MCQeasy

A Windows VM must install an agent and copy a configuration file automatically after provisioning. The administrator wants Azure to run the setup step without logging into the VM manually. Which feature should be used?

A.Boot diagnostics
B.VM extension
C.Managed disk encryption
D.Availability set
AnswerB

VM extensions are designed to perform post-deployment configuration tasks on Azure VMs. A custom script extension can install software, run commands, and place files on the machine without requiring the administrator to sign in manually. This makes it a practical choice for first-boot setup, configuration hardening, and lightweight automation tasks.

Why this answer

VM extensions are the correct Azure feature to automatically install agents and apply configurations during or after provisioning without manual login. The Custom Script Extension (CSE) specifically can execute a PowerShell or Bash script to install the agent and copy the configuration file, running as a post-deployment task via Azure Resource Manager (ARM) templates, Azure CLI, or PowerShell.

Exam trap

The trap here is that candidates confuse Boot diagnostics (which is for troubleshooting) with a feature that can run scripts, or assume that Managed disk encryption or Availability sets can perform automated setup tasks, when only VM extensions are designed for post-deployment configuration and software installation.

Why the other options are wrong

A

Boot diagnostics captures serial console output and screenshots for troubleshooting boot failures, but it does not install agents or copy configuration files automatically after provisioning.

C

Managed disk encryption secures data at rest using Azure Disk Encryption or server-side encryption, but it does not install agents or copy configuration files during VM provisioning.

D

An availability set is a logical grouping of VMs to provide high availability during planned or unplanned maintenance, not for running setup steps or installing agents after provisioning.

142
Multi-Selecthard

An application runs on two identical VMs in a region that does not support availability zones. The app must keep running through planned maintenance and a single hardware fault, and the team does not want to add a second region. Which two deployment choices are appropriate? Select two.

Select 2 answers
A.Place the VMs in an availability set.
B.Use a standard virtual machine scale set in the same region.
C.Put both VMs in the same fault domain to simplify patching.
D.Deploy the workload in availability zones anyway.
E.Use a second Azure region for the primary failover design.
AnswersA, B

An availability set spreads VMs across fault and update domains within the same datacenter scale unit, which protects against planned maintenance and single hardware failures. That matches the region’s lack of zones and the no-second-region requirement.

Why this answer

A is correct because an availability set distributes VMs across multiple fault domains (up to 3) and update domains (up to 20) within the same datacenter. This ensures that during planned maintenance (update domain isolation) or a hardware fault (fault domain isolation), at least one VM remains available, meeting the requirement without needing availability zones or a second region.

Exam trap

The trap here is that candidates might think an availability set is only for legacy scenarios, but it is the correct choice when availability zones are not supported, and a scale set is also valid because it inherently provides fault and update domain isolation without requiring zones.

Why the other options are wrong

C

Placing both VMs in the same fault domain defeats the purpose of fault tolerance; a single hardware fault would affect both VMs, causing application downtime. The question requires resilience to a single hardware fault, which necessitates separate fault domains.

D

The question states the region does not support availability zones, so deploying in availability zones is not possible.

E

The question explicitly states the team does not want to add a second region, so using a second Azure region for failover contradicts that requirement.

143
MCQeasy

An operations team wants to deploy the same set of Azure VMs every month from source control. The deployment should be readable, repeatable, and stored as code. What should they use?

A.Bicep template
B.Manual portal deployment
C.Azure Advisor recommendation
D.Azure Resource Explorer
AnswerA

Bicep is a declarative infrastructure-as-code language that is easier to read than raw ARM JSON. It is well suited for storing deployment definitions in source control and reusing them consistently across environments. Because it compiles to ARM templates, it still uses the Azure-native deployment engine while improving maintainability.

Why this answer

Bicep is a domain-specific language (DSL) that uses declarative syntax to deploy Azure resources as code. It provides readability, repeatability, and version control integration, making it ideal for deploying the same set of VMs monthly from source control. Unlike ARM templates, Bicep offers cleaner syntax and modularity, but both are valid infrastructure-as-code solutions.

Exam trap

The trap here is that candidates may confuse Azure Advisor (a recommendation engine) or Resource Explorer (a read-only browser) with deployment tools, or assume manual portal deployment is acceptable despite the explicit 'stored as code' requirement.

Why the other options are wrong

B

Manual portal deployment is not stored as code, lacks repeatability, and cannot be version-controlled from source control, failing the requirements of being readable, repeatable, and stored as code.

C

Azure Advisor provides recommendations for optimizing Azure resources, but it does not enable deploying VMs from source control as code. It is not a deployment tool.

D

Azure Resource Explorer is a tool for browsing and managing existing Azure resources, not for deploying infrastructure as code in a repeatable, source-controlled manner.

144
MCQeasy

You need to resize a VM to a larger size, but Azure says the target size is not available while the VM is running. What should you do first?

A.Delete the VM and recreate it from the image.
B.Deallocate the VM, then retry the resize.
C.Attach a new data disk first.
D.Create an availability set for the VM.
AnswerB

Deallocating the VM releases it from its current host cluster, which is the standard Azure fix for a resize failure caused by insufficient capacity on the existing hardware. Once deallocated, Azure can place the VM on a different cluster that supports the target VM size, so you can then retry the resize operation successfully. This preserves all disks, networking, and configuration, making it the least disruptive correct action.

Why this answer

When a VM is running, Azure may not have the target VM size available in the cluster hosting the VM. Deallocating the VM releases the underlying hardware resources and removes the VM from its current cluster, allowing Azure to select a new cluster that supports the desired size. After deallocation, the resize operation can succeed because the VM is no longer pinned to a specific host or cluster.

Exam trap

The trap here is that candidates often think they must delete and recreate the VM or perform complex workarounds, when the simple and correct first step is to deallocate the VM to free it from its current cluster constraint.

Why the other options are wrong

A

Deleting and recreating a VM from an image is unnecessary and disruptive; Azure allows resizing a VM after deallocation, which releases the current hardware reservation and enables selection of a different size in the same or different cluster.

C

Attaching a new data disk does not resolve the unavailability of the target VM size in the current cluster; resizing requires deallocation to move the VM to a different cluster where the size is available.

D

Creating an availability set does not affect the availability of VM sizes for resizing; it only provides high availability for VMs within the set. The issue is that the target size is not available while the VM is running, which requires deallocation first.

145
MCQeasy

You want to preview what a Bicep deployment will change before you apply it to a resource group. Which command should you use?

A.az deployment group what-if
B.az vm create
C.az monitor metrics list
D.az deployment group create --mode Complete
AnswerA

az deployment group what-if invokes Azure Resource Manager's what-if operation at a resource group or subscription scope. It takes a Bicep file or ARM template and compares the current deployed state against the desired state, then prints a table of predicted operations: Create, Modify, Delete, NoChange, and sometimes Ignore. It does not actually execute any deployment, so it is completely safe for previewing the impact of a Bicep deployment before applying it. You can further refine it with --exclude-change-types or --result-format to focus on specific changes.

Why this answer

The `az deployment group what-if` command allows you to preview the changes a Bicep deployment will make to a resource group before actually applying them. It returns a list of resources that will be created, modified, or deleted, enabling you to validate the deployment's impact without committing any changes. This is the correct tool for a dry-run or validation scenario.

Exam trap

The trap here is that candidates may confuse `az deployment group what-if` with `az deployment group validate` (which checks template syntax but does not show resource-level changes), or they might think `az deployment group create --mode Complete` provides a preview, when in fact it executes the deployment immediately.

Why the other options are wrong

B

The 'az vm create' command is used to deploy a new virtual machine, not to preview changes from a Bicep deployment. It does not provide a what-if analysis of deployment impacts.

C

The command 'az monitor metrics list' retrieves metric data for Azure resources, not deployment previews. It is unrelated to Bicep or ARM template deployment validation.

D

The `az deployment group create --mode Complete` command applies the deployment immediately without previewing changes, and Complete mode can delete resources not in the template, which is irreversible.

146
MCQmedium

A container group runs a nightly processing job in Azure Container Instances. The job should exit after completing successfully and should not restart automatically. Which restart policy should you configure?

A.Always
B.Never
C.OnFailure
D.Automatic
AnswerB

The 'Never' restart policy is correct for a nightly batch job because Azure Container Instances will run the container once to completion and then leave it in a stopped state without initiating any automatic restart, regardless of the exit code. This matches the expected lifecycle of a one-time processing workload that should not be relaunched after it finishes, either successfully or with an error.

Why this answer

The 'Never' restart policy ensures that the container group runs once and does not restart after it exits, regardless of the exit code. This is ideal for a nightly batch job that should complete and then stop permanently without automatic restarts.

Exam trap

The trap here is that candidates may confuse 'OnFailure' with 'Never' for successful jobs, not realizing that 'OnFailure' still restarts on failure, while the question requires no restart at all after successful completion.

Why the other options are wrong

A

The 'Always' restart policy restarts the container regardless of exit code, which contradicts the requirement that the job should exit after completing successfully and not restart automatically.

C

The job should exit after completing successfully and not restart. 'OnFailure' restarts the container only if it exits with a non-zero exit code (failure), but the question specifies the job completes successfully, so no restart is needed.

D

The 'Automatic' restart policy is not a valid option in Azure Container Instances; the valid policies are Always, Never, and OnFailure. Therefore, it cannot be configured for any container group.

147
MCQmedium

A reporting server will run an in-memory analytics workload that needs 8 vCPUs and 64 GiB RAM. CPU usage is expected to stay moderate, but the application benefits most from memory capacity. Which VM family should the administrator choose as the starting point?

A.B-series
B.D-series
C.F-series
D.E-series
AnswerD

The E-series is Azure's memory-optimized VM family, engineered with a high memory-to-CPU ratio to fit workloads like in-memory analytics. With configurations offering 64 GiB or more RAM per VM, it maximizes memory bandwidth and capacity for large datasets held entirely in RAM. This directly matches the reporting server's need for 64 GiB RAM, making it the correct choice.

Why this answer

The E-series (memory-optimized) VM family is designed for in-memory analytics workloads that require high memory-to-CPU ratios. With 8 vCPUs and 64 GiB RAM, the workload demands 8 GiB per vCPU, which aligns with E-series specifications (typically 8–16 GiB per vCPU). D-series offers a balanced ratio (4 GiB per vCPU) and would not provide sufficient memory capacity for this workload.

Exam trap

The trap here is that candidates often default to D-series (general purpose) for any 'moderate CPU' workload, overlooking the specific memory requirement that dictates the need for a memory-optimized family like E-series.

Why the other options are wrong

A

B-series VMs are burstable and designed for workloads with low average CPU usage but occasional spikes, not for consistent moderate CPU usage with high memory demands. They also lack the memory-to-CPU ratio needed for 64 GiB RAM with 8 vCPUs.

B

D-series VMs are general-purpose and balanced, but the workload benefits most from memory capacity, and E-series offers higher memory-to-core ratios (e.g., up to 8 GiB per vCPU) compared to D-series (typically 4 GiB per vCPU), making E-series more cost-effective for in-memory analytics.

C

F-series VMs are compute-optimized, prioritizing high CPU performance over memory capacity. The workload requires 64 GiB RAM, and F-series offers limited memory per vCPU (e.g., F8s_v2 has 8 vCPUs but only 16 GiB RAM), far below the needed 64 GiB.

148
MCQmedium

An online transaction app uses two identical VMs in an Azure region that supports availability zones. The business wants the app to stay available if an entire datacenter in the region fails. What should the administrator deploy?

A.An availability set with the VMs placed in different update domains.
B.Two VMs placed in different availability zones within the region.
C.A proximity placement group so both VMs stay physically close together.
D.A single VM with Premium SSD storage and automatic restart.
AnswerB

Availability zones place resources in separate datacenters inside the same region, so the workload can survive a complete zone or datacenter failure. For a requirement that explicitly includes datacenter-level resilience, zones are the correct choice. They provide stronger isolation than availability sets, which only protect against update domain and fault domain issues within a datacenter.

Why this answer

Deploying VMs in different availability zones protects against an entire datacenter failure. Each availability zone is a physically separate datacenter within an Azure region, with independent power, cooling, and networking. If one zone fails, the VM in the other zone remains available, ensuring business continuity for the app.

Exam trap

The trap here is that candidates confuse availability sets (which protect against rack-level failures within a single datacenter) with availability zones (which protect against entire datacenter failures), leading them to choose Option A instead of B.

Why the other options are wrong

A

An availability set protects against planned and unplanned maintenance within a single datacenter, not against an entire datacenter failure. The question requires protection from a full datacenter outage, which availability zones provide.

C

A proximity placement group reduces network latency by keeping VMs physically close, but it does not protect against an entire datacenter failure because all VMs could be in the same datacenter.

D

A single VM with Premium SSD and automatic restart cannot survive an entire datacenter failure; if the datacenter hosting that VM goes down, the VM becomes unavailable regardless of storage or restart policies.

149
MCQhard

A Windows VM fails to start after a configuration change. You need to capture screenshots and serial console output to troubleshoot the boot problem. Which feature should you use?

A.Azure Backup
B.Boot diagnostics
C.Just-in-Time VM access
D.Autoscale
AnswerB

Boot diagnostics is the correct tool because it captures the VM's serial console output and screenshots during startup, which can reveal exactly where the boot process halts after the configuration change. This helps identify misconfigured services, missing drivers, or corrupt boot files. Unlike other options, it directly provides actionable boot-time logs without requiring access to the VM.

Why this answer

Boot diagnostics captures serial console output and screenshots of a VM during boot, which is essential for troubleshooting boot failures after a configuration change. This feature provides logs and visual data from the VM's boot process, accessible via the Azure portal or CLI, without requiring guest OS access.

Exam trap

The trap here is that candidates confuse boot diagnostics with Azure Backup or recovery services, assuming that restoring from a backup is the primary troubleshooting step for boot failures, rather than using the built-in diagnostic feature that captures real-time boot data.

Why the other options are wrong

A

Azure Backup is designed for data protection and recovery, not for troubleshooting boot failures. It cannot capture screenshots or serial console output of a VM's boot process.

C

Just-in-Time VM access is a security feature that restricts inbound traffic to VMs, not a troubleshooting tool for boot issues. It does not provide screenshots or serial console output.

D

Autoscale automatically adjusts the number of VM instances based on demand, but it does not provide any diagnostic tools like screenshots or serial console output for troubleshooting boot failures.

150
MCQmedium

You need to deploy 30 identical Azure virtual machines for a web application and scale the instance count automatically based on CPU demand. Which Azure compute feature should you use?

A.An availability set
B.A Virtual Machine Scale Set
C.A Recovery Services vault
D.Boot diagnostics
AnswerB

Scale Sets provide grouped deployment and autoscaling.

Why this answer

Virtual Machine Scale Sets (VMSS) are designed specifically to deploy and manage a group of identical, load-balanced VMs that can automatically scale in or out based on CPU demand or other metrics. This matches the requirement for 30 identical VMs and autoscaling, making B the correct choice.

Exam trap

The trap here is that candidates often confuse availability sets (which provide high availability) with scale sets (which provide both high availability and autoscaling), leading them to pick A when the question explicitly requires automatic scaling based on demand.

Why the other options are wrong

A

An availability set provides high availability by distributing VMs across fault and update domains, but it does not support automatic scaling based on CPU demand.

C

A Recovery Services vault is used for backup and disaster recovery, not for deploying or scaling virtual machines. It does not provide automatic scaling based on CPU demand.

D

Boot diagnostics provides troubleshooting information for VM boot failures, but it does not support deploying multiple VMs or autoscaling based on CPU demand.

← PreviousPage 2 of 3 · 190 questions totalNext →

Ready to test yourself?

Try a timed practice session using only AZ Compute questions.