Microsoft AZ-104 Practice Test 25
Question 240
A blob has previous versions but a restore script downloads only the current revision. How can older data be retrieved?
- Enable blob versioning and lifecycle policy rules for eligible previous versions.
- Review previous-version lifecycle age filters and actual retention requirements.
- Select the desired blob version ID or promote a previous version through the supported API.
- Use Azure Data Lake Storage Gen2 hierarchical namespace in a compatible account.
Explanation
Correct Answer
C:Blob versions have distinct identifiers. Ordinary reads without a version selector target the current committed blob.
Incorrect Answers
A:Versioning provides history, while lifecycle cleanup bounds retained versions under policy. A versioning switch alone can grow storage indefinitely. This matters here because a blob has previous versions but a restore script downloads only the current revision. How can older data be retrieved.
B:Lifecycle policies can remove eligible past versions. Recovery expectations must align with the configured cleanup window.
D:Hierarchical namespace supports directories and ACLs for data-lake workloads, with Blob API integration. Design must check feature compatibility.
Question 241
An auditor wants accidental deletion of an entire blob container to be recoverable for 14 days. Which feature must be active?
- Configure container soft delete with a 14-day retention period.
- Verify SMB TCP port 445 connectivity along the client network path.
- Enable blob-level soft delete but leave the separate container soft-delete setting disabled.
- Enable only blob soft delete while leaving the separate container soft-delete feature disabled.
Explanation
Correct Answer
A:Container soft delete preserves eligible deleted containers for recovery during the retention window. Blob versioning alone does not replace it.
Incorrect Answers
B:SMB traffic depends on TCP 445 reachability unless supported alternate network connectivity is used. Share permission changes cannot correct a network port block. This matters here because an auditor wants accidental deletion of an entire blob container to be recoverable for 14 days. Which feature must….
C:Container deletion removes the container namespace; enable container soft delete for the required recovery interval rather than relying only on deleted-blob retention.
D:Blob soft delete protects individual blob objects and versions, not an accidental deletion of the entire container. A 14-day container-level recovery objective requires container soft delete with the appropriate retention period.
Question 242
A deleted container is no longer visible in the normal active container list. What recovery view should be inspected?
- Search only active containers and expect a deleted container to reappear without using the soft-deleted container recovery view.
- Inspect the execute or traverse ACL on each parent directory in the hierarchical namespace.
- Initiate blob rehydration to a supported online tier and await completion.
- List soft-deleted containers and restore the eligible container by name and version when applicable.
Explanation
Correct Answer
D:Deleted containers are separate from active containers during soft-delete retention. Normal listing may hide recoverable entries.
Incorrect Answers
A:A deleted container must be discovered through the appropriate deleted-container listing/restore operation while its retention window remains open.
B:Directory traversal can be required to reach child objects. File read permission alone does not bypass missing parent execute rights.
C:Archived blobs are not directly readable. Rehydration moves the object to an accessible tier and may take hours depending on priority.
Question 243
A Bicep deployment errors because the web app is created without an available hosting plan. What should be inspected?
- Set the web app serverFarmId to a managed identity resource ID instead of the intended App Service plan.
- Run the resource-group deployment again while leaving the web app's hosting plan ID and dependency unresolved.
- Run the deployment what-if command and assume its report automatically creates the missing hosting plan.
- Check the plan's resource ID and the web app's inferred or explicit dependency.
Explanation
Correct Answer
D:A reference to an incorrect plan ID may fail even when both resources are described. Correct symbolic dependency and valid ID resolution are needed.
Incorrect Answers
A:The site needs the compatible hosting-plan resource ID; an identity ID is a different resource type and cannot repair that missing dependency.
B:A repeat invocation can't supply a missing App Service plan reference. Correct the application's plan ID and its inferred or explicit dependency first.
C:Previewing a deployment cannot manufacture a missing plan or repair the web app's invalid hostingPlan reference. Check the planned resource ID and dependency graph.
Question 244
A release engineer wants to preview Azure resource changes without modifying production. What command family is appropriate?
- Use the deployment command for the file's intended target scope and resource-group context.
- Run ARM or Bicep deployment what-if at the target deployment scope.
- Run az deployment group create directly against production before inspecting the proposed resource changes.
- Export the deployment service principal ID and regard that identifier as the preview of pending resource changes.
Explanation
Correct Answer
B:ARM/Bicep what-if compares the proposed deployment against current resources and displays projected creates, changes or deletes without writing those changes. It fits the explicit requirement to inspect production before apply.
Incorrect Answers
A:Deployment scope affects available resource types and evaluation context. A resource-group template cannot simply be run as a subscription-scoped deployment.
C:The create command applies the deployment; it is not the requested dry-run review. Use the group-scoped what-if operation to inspect predicted changes without applying them.
D:A service principal identifier describes the caller, not the resource diff. The group-scoped what-if operation is the nonmutating deployment preview.
Question 245
A what-if report includes a deletion and the team expected only additions. What should be done?
- Use what-if and review the deployment mode's deletion semantics before execution.
- Ignore a predicted resource deletion whenever the deployment service principal ID is unchanged.
- Investigate the proposed deletion and deployment mode before executing the actual deployment.
- Declare a named output in the module and reference module.outputs from the parent.
Explanation
Correct Answer
C:What-if output helps identify potentially destructive effects. Approval should not rely only on a successful syntax validation. This matters here because a what-if report includes a deletion and the team expected only additions.
Incorrect Answers
A:Complete mode can remove resources omitted from supported deployment scopes, while incremental mode usually retains them. Destructive changes require explicit approval.
B:The caller identity does not determine which resources a deployment may delete. Review the proposed changes, mode, and template before any apply operation.
D:Module outputs are explicit values made available to callers. A variable inside a module is not automatically visible in the parent. This matters here because a what-if report includes a deletion and the team expected only additions.
Question 246
An operations script must deploy a Bicep file to a known resource group using Azure CLI. Which command is appropriate?
- Run a resource-group what-if simulation and treat the reported changes as an applied VM deployment.
- Run az deployment group create with the target resource group and template inputs.
- Set targetScope to subscription and use resource types supported at that scope.
- Guard dependent references and outputs consistently when the resource is conditionally deployed.
Explanation
Correct Answer
B:For a Bicep file that targets an existing resource group, `az deployment group create` supplies the file and parameters in that group scope. Subscription-level deployment commands would operate at a different scope from the declared target.
Incorrect Answers
A:What-if only predicts creates and modifications without applying them. An authorized group-scoped create operation is needed to provision the Bicep resources.
C:Bicep targetScope selects the deployment level. Resource groups and policy assignments can use subscription context under appropriate templates.
D:Conditional resources can be omitted, so unguarded references can fail. The dependency graph and expressions must handle the disabled case.
Question 247
The operator used az deployment sub create but the file expects a resource-group target. What should be changed?
- Align the deployment targetScope and resource declarations with supported scope types.
- Run subscription-level what-if and keep calling az deployment sub create for a resourceGroup-scoped file.
- Set targetScope to subscription and use resource types supported at that scope.
- Use the deployment command for the file's intended target scope and resource-group context.
Explanation
Correct Answer
D:Deployment scope affects available resource types and evaluation context. A resource-group template cannot simply be run as a subscription-scoped deployment. This matters here because the operator used az deployment sub create but the file expects a resource-group target.
Incorrect Answers
A:Azure Resource Manager enforces resource type availability at scopes. Changing a command flag alone cannot make a resource valid at the wrong scope.
B:A preview does not resolve the mismatch between the template's declared target scope and the deployment command. Execute the correct resource-group-scoped command after validation.
C:Bicep targetScope selects the deployment level. Resource groups and policy assignments can use subscription context under appropriate templates. This matters here because the operator used az deployment sub create but the file expects a resource-group target.
Question 248
A custom script extension fails and the VM Agent status reads Not Ready. What should be examined?
- Supply supported custom data and configure the guest initialization service to consume it.
- Inspect the Azure VM Agent service health and the extension execution logs in the guest.
- Inspect cloud-init configuration and logs for the guest image's custom-data processing.
- Configure an SSH public key for the Linux admin and protect the private key outside Azure.
Explanation
Correct Answer
B:Extension delivery depends on a functioning VM agent and compatible guest environment. A healthy VM network path does not prove extension readiness.
Incorrect Answers
A:VM custom data makes bootstrap content available, but whether scripts execute depends on the guest image and cloud-init or other handlers. This matters here because a custom script extension fails and the VM Agent status reads Not Ready.
C:Passing user data to a VM is not identical to executing it. A compatible image and initialization configuration are required.
D:SSH public-key login avoids password reuse and supports controlled key management. The VM stores only the public key for verification. This matters here because a custom script extension fails and the VM Agent status reads Not Ready.
Question 249
A web app needs several VM replicas spread across separate update and fault domains in a datacenter. Which construct helps?
- Create an availability set and place the supported VMs within it.
- Place supported VM instances in different availability zones within the region.
- Check the VM OS disk deleteOption and any cleanup automation or policy.
- Place every VM replica in the same availability-set fault domain and update domain.
Explanation
Correct Answer
A:Availability sets distribute instances across fault and update domains inside a local datacenter failure boundary. They do not create cross-region replicas. This matters here because a web app needs several VM replicas spread across separate update and fault domains in a datacenter. Which construct….
Incorrect Answers
B:Zones provide distinct facility-level fault isolation in supported regions. An availability set alone does not span separate zones.
C:Managed disk retention is conditional on delete settings and separate cleanup. VM deletion does not guarantee every disk is preserved.
D:Concentrating instances in one fault and update domain defeats distribution across failure and planned-maintenance boundaries. An availability set uses multiple fault/update domains for supported VMs.
Question 250
A planned host maintenance event reboots all VMs placed outside any availability design. What should be corrected?
- Inspect cloud-init configuration and logs for the guest image's custom-data processing.
- Move to a multi-zone or multi-region resiliency design where supported.
- Attach an appropriately sized persistent Azure managed data disk and mount it in the guest.
- Review deployment to availability sets or availability zones with appropriate redundancy.
Explanation
Correct Answer
D:Placement across distinct update domains can reduce simultaneous planned maintenance impact. Plain independent VMs may share risk.
Incorrect Answers
A:Passing user data to a VM is not identical to executing it. A compatible image and initialization configuration are required. This matters here because a planned host maintenance event reboots all VMs placed outside any availability design.
B:Availability sets reduce host-level correlated failures but do not create independent zonal or regional facilities.
C:Managed disks provide durable Azure storage tied to the VM, whereas temporary disks can lose data on deallocation or host events. This matters here because a planned host maintenance event reboots all VMs placed outside any availability design.