Question

Difficulty: MediumResource Locks

An Azure administrator configures resource locks in a Microsoft Azure subscription. The administrator applies a ReadOnly lock to a resource group named RG-Production. Within RG-Production, there is an Azure Virtual Machine named VM-App1. The administrator then applies a CanNotDelete lock directly to VM-App1.

Which of the following statements describe the combined effects of these locks on VM-App1? Select two.

  1. Authorized users are prevented from deleting VM-App1.Answer
  2. Authorized users are prevented from starting or stopping VM-App1.Answer
  3. C
    Authorized users can modify the virtual machine settings because of the CanNotDelete lock.
  4. D
    Authorized users can modify the configuration of VM-App1 because the lock applied directly to the resource overrides the resource group lock.

Answer

Authorized users are prevented from deleting the virtual machine, and they are also prevented from starting or stopping the virtual machine.
Resource locks are inherited from parent scopes to child resources. When multiple locks are applied, they are additive, meaning the most restrictive lock settings apply. The ReadOnly lock from the resource group prevents any modifications or control operations (such as starting or stopping the virtual machine), while both locks prevent the deletion of the resource.

Step-by-Step Solution

1
Analyze lock inheritance rules in Azure.
Resource locks applied at the resource group level are inherited by all resources within that resource group. Therefore, the ReadOnly lock applies to VM-App1.
To determine which locks are active on VM-App1.
2
Determine the combined effect of multiple locks.
Locks are additive. Since VM-App1 has both a ReadOnly lock (inherited) and a CanNotDelete lock (directly applied), the most restrictive lock rules apply. ReadOnly is more restrictive than CanNotDelete.
To evaluate how the two lock types interact.
3
Evaluate the capabilities allowed by the active locks.
The ReadOnly lock prevents deletion and any modifications, including operations like starting and stopping the virtual machine. The CanNotDelete lock also prevents deletion.
To identify the correct statements regarding the effects on the virtual machine.

Key Concept

Resource locks are inherited, additive, and the ReadOnly lock prevents both deletion and configuration updates (including stopping or starting virtual machines).
Rate this question