Microsoft AZ-104 Practice Test 16
Question 150
A data processor must keep files after host maintenance and cannot risk loss on the temporary VM disk. Where should files be stored?
- Attach an appropriately sized persistent Azure managed data disk and mount it in the guest.
- Enable encryption at host for supported virtual machines and disk configurations.
- Expand the guest filesystem on the VM's temporary disk and assume that makes the files survive host redeployment.
- Ensure application state and load balancing support failover, not merely VM placement.
Explanation
Correct Answer
A:Managed disks provide durable Azure storage tied to the VM, whereas temporary disks can lose data on deallocation or host events.
Incorrect Answers
B:Encryption at host covers eligible host-side data paths beyond ordinary persistent managed disk encryption. Support depends on region, VM and disk options. This matters here because a data processor must keep files after host maintenance and cannot risk loss on the temporary VM disk.
C:A larger partition on temporary storage remains temporary; maintenance and deallocation can erase that data. Use a persistent managed data disk or appropriate durable service for files that must survive host changes.
D:Infrastructure placement increases availability but cannot automatically make a single-host stateful app stateless. Health routing and data continuity are separate needs.
Question 151
An engineer loses cache data after a VM is moved to another host. Which disk characteristic explains it?
- Validate application-level service status separately from the extension's provisioning status.
- Enable encryption at host for supported virtual machines and disk configurations.
- Recognize that the VM temporary disk is nonpersistent through certain host lifecycle events.
- Review encryption-at-host support and configuration separately from managed disk encryption.
Explanation
Correct Answer
C:Temporary storage is local to the VM host and should not hold irreplaceable application content. Use persistent managed disks for durable data.
Incorrect Answers
A:Extension execution status does not necessarily prove that a custom installed service started correctly. Observe the actual workload outcome.
B:Encryption at host covers eligible host-side data paths beyond ordinary persistent managed disk encryption. Support depends on region, VM and disk options. This matters here because an engineer loses cache data after a VM is moved to another host. Which disk characteristic explains it.
D:Managed disk server-side encryption and encryption at the host operate at different layers. Configuring one does not imply the other.
Question 152
An operator shuts down Windows inside the VM but Azure compute charges continue. Which control-plane action stops normal compute billing?
- Publish a versioned image definition in Azure Compute Gallery with supported regional replication.
- Use a supported VM extension or configuration-management mechanism with the required script.
- Create an availability set and place the supported VMs within it.
- Stop and deallocate the VM from Azure.
Explanation
Correct Answer
D:Guest OS shutdown can leave allocated compute resources. Deallocation releases the allocation, while persistent disks still incur charges.
Incorrect Answers
A:Compute Gallery stores and distributes reusable image versions for consistent provisioning across locations. It is more structured than cloning one VM manually.
B:Post-deployment automation is repeatable and can report success or failure. RDPing into each instance is operationally fragile.
C:Availability sets distribute instances across fault and update domains inside a local datacenter failure boundary. They do not create cross-region replicas.
Question 153
A deallocated VM continues incurring storage costs. Why is this expected?
- Review encryption-at-host support and configuration separately from managed disk encryption.
- Create a point-in-time snapshot of the managed disk.
- Move the deallocated VM to a different availability zone and assume the attached managed disks will no longer be billed.
- Check managed disk and other retained resource charges separately from VM compute.
Explanation
Correct Answer
D:Deallocation ends normal allocated compute charges but does not automatically delete attached managed disks or public IP resources. This matters here because a deallocated VM continues incurring storage costs. Why is this expected.
Incorrect Answers
A:Managed disk server-side encryption and encryption at the host operate at different layers. Configuring one does not imply the other. This matters here because a deallocated VM continues incurring storage costs. Why is this expected.
B:Managed disk snapshots capture persistent disk contents for restore, forensic comparison or new disk creation. They are distinct from guest application-aware backup.
C:A zone change addresses placement and possible resilience, not retention charges. Managed disks remain billable after the VM releases compute capacity unless separately removed under approved retention controls.
Question 154
An Azure VM needs SSH authentication without a reusable administrator password. Which provisioning input is appropriate?
- Configure an SSH public key for the Linux admin and protect the private key outside Azure.
- Bastion connects through the VNet to the VM's private IP rather than requiring a VM public address.
- Move a VM resource between groups and assume its administrator credentials become SSH public-key authentication.
- Inspect VM-level storage performance limits rather than assuming the disk tier is undersized.
Explanation
Correct Answer
A:SSH public-key login avoids password reuse and supports controlled key management. The VM stores only the public key for verification.
Incorrect Answers
B:A VNet-hosted Bastion host brokers approved sessions to private VM addresses. A public IP on each guest is not necessary.
C:Administrative grouping does not change guest login configuration. Provision a supported SSH public key and preserve its private counterpart securely instead of reusing a password.
D:The VM host's aggregate caps can limit total performance independently of an individual disk's maximum specifications.
Question 155
Linux SSH key authentication works but password login remains enabled and exposed to the Internet. What hardening step matters?
- Bastion connects through the VNet to the VM's private IP rather than requiring a VM public address.
- Increase compute quota without disabling SSH password authentication and tightening network access.
- Disable password authentication under approved access policy and limit SSH ingress through NSG or Bastion.
- Use Azure Bastion or tightly scoped management-source NSG rules instead of open public SSH.
Explanation
Correct Answer
C:Key authentication alone does not prohibit password guessing if the daemon still accepts passwords. Network exposure should also be narrowed.
Incorrect Answers
A:A VNet-hosted Bastion host brokers approved sessions to private VM addresses. A public IP on each guest is not necessary. This matters here because linux SSH key authentication works but password login remains enabled and exposed to the Internet. What hardening….
B:The SSH threat is exposure of password-based login, not insufficient regional capacity. Disable password authentication when key-based access is validated and restrict inbound SSH to approved management paths.
D:Bastion supports browser-based private management; narrowly scoped NSG ingress reduces exposed attack paths.
Question 156
A fleet of Windows VMs needs post-provision software installation without manual RDP access. Which Azure feature should be used?
- Use Azure Update Manager solely to schedule guest OS patch assessment, not application installation.
- Install a supported VM extension such as Custom Script Extension for configuration.
- Confirm the VM is stopped or deallocated as required and the size permits another NIC.
- Supply supported custom data and configure the guest initialization service to consume it.
Explanation
Correct Answer
B:VM extensions execute platform-managed post-deployment tasks through the guest agent. Automation is more repeatable than per-VM manual sessions.
Incorrect Answers
A:Azure Update Manager orchestrates patch assessment and installation; it does not run the application-specific installation script requested for the Windows fleet. A VM extension is appropriate for the stated post-provision work.
C:Adding or removing NICs requires supported VM state and SKU capacity. Azure cannot attach an arbitrary number of NICs during running operation.
D:VM custom data makes bootstrap content available, but whether scripts execute depends on the guest image and cloud-init or other handlers.
Question 157
A development team needs a private managed container-image registry integrated with Azure identities. Which Azure service provides that?
- Create an Azure Container Registry for the application images.
- Grant AcrPull or an applicable repository-level pull permission to its identity.
- Verify the identity has registry pull rights at the appropriate ACR scope.
- Restart or deploy a revision that consumes the updated secret reference as required.
Explanation
Correct Answer
A:ACR stores and distributes OCI-compatible container artifacts under supported Azure authentication. ACI runs workloads rather than acting as an image registry.
Incorrect Answers
B:A pull-specific role minimizes registry privilege. Push authorization would permit unnecessary artifact modification.
C:Authentication proves the identity, not its permission to read image manifests and layers. Registry authorization is a separate gate.
D:Container environment variables can be initialized at replica startup. Updating a secret does not always refresh an already running process.
Question 158
A pipeline pushes a container image to the registry but the deployment still uses yesterday's build. What image reference should be inspected?
- Understand that digest references remain bound to the previously specified image content.
- Pin the deployed container to a verified immutable image digest.
- Set a supported minimum replica count above zero to maintain warm capacity.
- Check the image tag or immutable digest referenced by the deployed workload.
Explanation
Correct Answer
D:Pushing a new image does not automatically change every running deployment. Tags and digests determine which image revision is requested.
Incorrect Answers
A:A tag can move to another manifest while a digest identifies one immutable artifact. Update the deployment reference to roll out new bytes.
B:Digests identify exact content independent of mutable tags. This reduces accidental deployment of an unreviewed artifact.
C:Nonzero minimum replicas reduce cold starts but consume resources during idle periods. A zero minimum optimizes idle cost.
Question 159
A deployment identity only needs to pull images from a private registry, not publish them. Which registry permission fits?
- Assign only management-plane Reader on the registry and expect the runtime to pull private image layers.
- Grant AcrPull or an applicable repository-level pull permission to its identity.
- Restart or deploy a revision that consumes the updated secret reference as required.
- Grant appropriately scoped AcrPush or repository writer privileges to the build identity.
Explanation
Correct Answer
B:A pull-particular role minimizes registry privilege. Push authorization would permit unnecessary artifact modification.
Incorrect Answers
A:Viewing a registry resource is not the same as downloading its images. Grant the runtime appropriate repository-reader or AcrPull data access, not registry administration.
C:Container environment variables can be initialized at replica startup. Updating a secret does not always refresh an already running process. This matters here because a deployment identity only needs to pull images from a private registry, not publish them. Which registry permission….
D:Push permissions allow publishing image content while avoiding registry admin credentials. Use repository scope where supported.
Question 160
A container cannot download an image while its managed identity can authenticate to Azure. What should be checked?
- Reduce requested resources or request an eligible regional ACI quota increase.
- Create another empty registry while leaving the container identity without pull permission on its image source.
- Inspect the build principal's ACR write permissions and repository scope.
- Verify the identity has registry pull rights at the appropriate ACR scope.
Explanation
Correct Answer
D:Authentication proves the identity, not its permission to read image manifests and layers. Registry authorization is a separate gate. This matters here because a container cannot download an image while its managed identity can authenticate to Azure.
Incorrect Answers
A:Local Docker execution does not test Azure subscription quota. Deployment requires Azure-side capacity authorization.
B:A new registry does not authorize the existing image pull. Confirm the runtime identity, registry scope, image reference and pull-capable role assignment.
C:Read-only registry credentials cannot publish new manifests. Scope and role assignment must allow writes.