exam questions

Exam AZ-500 All Questions

View all questions & answers for the AZ-500 exam

Exam AZ-500 topic 1 question 21 discussion

Actual exam question from Microsoft's AZ-500
Question #: 21
Topic #: 1
[All AZ-500 Questions]

Your company has an Azure subscription that includes two virtual machines, named VirMac1 and VirMac2, which both have a status of Stopped (Deallocated).
The virtual machines belong to different resource groups, named ResGroup1 and ResGroup2.
You have also created two Azure policies that are both configured with the virtualMachines resource type. The policy configured for ResGroup1 has a policy definition of Not allowed resource types, while the policy configured for ResGroup2 has a policy definition of Allowed resource types.
You then create a Read-only resource lock on VirMac1, as well as a Read-only resource lock on ResGroup2.
Which of the following is TRUE with regards to the scenario? (Choose all that apply.)

  • A. You will be able to start VirMac1.
  • B. You will NOT be able to start VirMac1.
  • C. You will be able to create a virtual machine in ResGroup2.
  • D. You will NOT be able to create a virtual machine in ResGroup2.
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
SajjadKarim
Highly Voted 3 years, 10 months ago
Correct answer is B and D, When you will create a virtual machine in ResGroup2 it will give you error "The selected resource group is read only"
upvoted 75 times
dumdada
3 years, 9 months ago
correct
upvoted 5 times
...
[Removed]
3 years, 5 months ago
correct
upvoted 4 times
...
justjeroen
2 years ago
But you dont crate virmac2, you only start virmac2. This should not be considered a change in the resource group.
upvoted 1 times
zellck
2 years ago
https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources?tabs=json#considerations-before-applying-your-locks A read-only lock on a resource group that contains a virtual machine prevents all users from starting or restarting a virtual machine. These operations require a POST method request.
upvoted 11 times
...
...
...
Yiannisthe7th
Highly Voted 3 years, 10 months ago
B and D for sure. When you create a new VM and select a read-only resource group you get a "The selected resource group is read only"
upvoted 12 times
DarkCyberGhost
3 years, 4 months ago
but the Rrsource group is not set to read-only. Virmac1 and 2 is set to read-only, the resource group 2 in which virmac2 sits has a policy of resource is allowed. so machines can be created in the group. so to me the Answer is B and C
upvoted 3 times
Joshing
3 years, 3 months ago
Virmac1 is read-only and so is ResGroup2. You cannot start Virmac1 and cannot create a VM in ResGroup2.
upvoted 4 times
...
...
...
Rednevi
Most Recent 2 months ago
Selected Answer: BD
Statement B is true: The Read-only lock on VirMac1 prevents it from being started.​ Statement D's validity depends on the specific configuration of the Allowed resource types policy in ResGroup2. If virtual machines are not permitted by the policy, then Statement D is true; otherwise, it is false.
upvoted 1 times
...
Ruffyit
7 months, 1 week ago
A read-only lock on a resource group that contains a virtual machine prevents all users from starting or restarting a virtual machine. These operations require a POST method request
upvoted 2 times
...
153a793
8 months, 2 weeks ago
Answer should be BD. if a resource group has a read-only lock, you won’t be able to start a virtual machine (VM) that is in a Stopped (Deallocated) state. A read-only lock prevents any changes to the resources within the resource group, including starting or stopping VMs.
upvoted 1 times
...
thatazureguy
8 months, 3 weeks ago
B and C A Read only lock on RG doesn't prevent to create new resources
upvoted 1 times
...
xRiot007
10 months, 2 weeks ago
B - You cannot start Mac1 because starting a VM involves a POST request, which will not be done while the resource is Read-only D - for the same reason.
upvoted 2 times
...
Data_Works
11 months, 2 weeks ago
Selected Answer: BD
Read-only lock on a resource prevents all write operations, including changing the state of the VM (such as starting or stopping it)
upvoted 3 times
...
Jimmy500
11 months, 2 weeks ago
For virtual machine Virmac1 we have read only lock which will not allow to start stop delete it so the answer for the VirMac1 will be B . For the resource group - ResGroup2 we also have same Read only which basically will not allow to do anyything else besides current config then answer for this will be D. Correct answer will be here BD but keep in mind that question says Read Only lock there can be also CanNotDelete lock as well in the other question then we can start machine for example but can not delete machine. Please refer this link for more information but here answer is BD. https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources?tabs=json
upvoted 2 times
...
Mazhar1993
1 year, 1 month ago
You will be able to start VirMac1. TRUE: Read-only locks don't affect starting a virtual machine; they only prevent modifications or deletions. You will NOT be able to start VirMac1. NOT TRUE: Read-only locks don't restrict starting a virtual machine; they only prevent modifications or deletions. You will be able to create a virtual machine in ResGroup2. TRUE: The policy for ResGroup2 allows virtual machine creation, and read-only locks only prevent modifications, not creations. You will NOT be able to create a virtual machine in ResGroup2. NOT TRUE: The policy for ResGroup2 permits virtual machine creation, and read-only locks only prevent modifications, not creations. https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources?tabs=json#considerations-before-applying-your-locks
upvoted 2 times
Wezen
11 months, 3 weeks ago
A read-only lock on a resource group that contains a virtual machine prevents all users from starting or restarting a virtual machine. These operations require a POST method request
upvoted 1 times
...
...
Ruffyit
1 year, 2 months ago
Correct answer is B and D, When you will create a virtual machine in ResGroup2 it will give you error "The selected resource group is read only"
upvoted 1 times
...
b9e98e8
1 year, 3 months ago
Azure Policy focuses on pre-deployment compliance, while Resource Locks safeguard resources post-deployment against accidental changes. Given a scenario where VM is allowed policy and resource lock both are working on RG level then according to pre deployment compliance you are able to create a VM in that RG but according to post deployment protection through resource lock you wont be able to make any write activity( restarting or changing disk etc ) on existing VM in that RG.
upvoted 1 times
...
zied01
1 year, 6 months ago
i can't understand what is the relation here between the azure policy and azure locks ?!!! cause the question indicate two different things !
upvoted 1 times
...
Feraso
1 year, 7 months ago
Selected Answer: BD
I just tested in the lab and BD are the correct answers. B: You can't start the VM that has read only lock, you will be getting this error: Failed to start virtual machine 'WinServer1'. Error: The scope 'WinServer1' cannot perform write operation because following scope(s) are locked: '/subscriptions/be739432-1223-4cbf-bc85-1287e4269fe6/resourceGroups/TestLAB/providers/Microsoft.Compute/virtualMachines/WinServer1'. Please remove the lock and try again. D: Setting the resource group to read only will prevent you from creating virtual machines. You will get an error that the resource group is read only.
upvoted 7 times
...
MeisAdriano
1 year, 7 months ago
Selected Answer: BD
B: A read-only lock on a resource group that contains a virtual machine prevents all users from starting or restarting a virtual machine. These operations require a POST method request D: A read-only lock on a resource group prevents users from moving any new resource into that resource group. https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources?tabs=json#considerations-before-applying-your-locks
upvoted 1 times
...
ittchmh
1 year, 8 months ago
Selected Answer: BD
Mistyped, I can't remove or change my comments I will go with BD
upvoted 1 times
...
ittchmh
1 year, 8 months ago
Selected Answer: BC
I will go with BC
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...