nerdexam
Microsoft

AZ-120 · Question #156

You have an Azure subscription. The subscription contains a virtual machine named VM1 that runs SAP HANA and a user named User1. User1 is assigned the Virtual Machine Contributor role for VM1. You…

The correct answer is B. Create a resource lock on VM1. Virtual Machine Contributor role allows a user to start, stop, and deallocate VMs. This means User1 can stop (deallocate) VM1, which releases compute resources and stops billing for To prevent stopping (deallocating) the VM via Azure Portal or API, you can create a resource…

Maintain SAP workloads on Azure

Question

You have an Azure subscription. The subscription contains a virtual machine named VM1 that runs SAP HANA and a user named User1. User1 is assigned the Virtual Machine Contributor role for VM1. You need to prevent User1 from placing VM1 in the Stopped (deallocated) state. User1 must be able to restart the operating system on VM1. What should you do?

Options

  • AAssign an Azure Policy definition to the resource group that contains VM1.
  • BCreate a resource lock on VM1.
  • CConfigure the Desired State Configuration (DSC) extension on VM1.
  • DAssign User1 the Virtual Machine User Login rote for VM1.

How the community answered

(28 responses)
  • A
    7% (2)
  • B
    75% (21)
  • C
    4% (1)
  • D
    14% (4)

Explanation

Virtual Machine Contributor role allows a user to start, stop, and deallocate VMs. This means User1 can stop (deallocate) VM1, which releases compute resources and stops billing for To prevent stopping (deallocating) the VM via Azure Portal or API, you can create a resource lock of type CanNotDelete or ReadOnly on VM1 or its resource group. A resource lock prevents users from performing destructive operations such as deleting or stopping (deallocating) the VM, but it does not prevent restarting the OS inside the VM. Restarting the OS from inside the VM is an OS-level operation and does not require Azure

Topics

#resource lock#RBAC#VM lifecycle management#access control

Community Discussion

No community discussion yet for this question.

Full AZ-120 Practice