Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam AZ-104 topic 2 question 39 discussion

Actual exam question from Microsoft's AZ-104
Question #: 39
Topic #: 2
[All AZ-104 Questions]

You have an Azure subscription that contains a resource group named TestRG.
You use TestRG to validate an Azure deployment.
TestRG contains the following resources:

You need to delete TestRG.
What should you do first?

  • A. Modify the backup configurations of VM1 and modify the resource lock type of VNET1
  • B. Remove the resource lock from VNET1 and delete all data in Vault1
  • C. Turn off VM1 and remove the resource lock from VNET1
  • D. Turn off VM1 and delete all data in Vault1
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations.
Reference:
https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/delete-resource-group?tabs=azure-powershell

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
mlantonis
Highly Voted 2 years, 11 months ago
Correct Answer: B When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations. As an administrator, you can lock a subscription, resource group, or resource to prevent other users in your organization from accidentally deleting or modifying critical resources. The lock overrides any permissions the user might have. You can't delete a vault that contains backup data. Once backup data is deleted, it will go into the soft deleted state. So you have to remove the lock on order to delete the VNET and delete the backups in order to delete the vault. Reference: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/delete-resource-group?tabs=azure-powershell https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources https://docs.microsoft.com/en-us/azure/backup/backup-azure-delete-vault#before-you-start
upvoted 277 times
Gyanshukla
2 years, 8 months ago
correct
upvoted 2 times
...
monus
2 years, 6 months ago
backup can be taken even if vm is powered off. so, I think the answer is A.
upvoted 11 times
...
AubinBakana
2 years, 8 months ago
No, this is wrong. one of the reasons why resource groups were designed is to facilitate the deletion of resources in Dev environments. You delete the RG and all its components are gone. C is the answer.
upvoted 1 times
AubinBakana
2 years, 8 months ago
sorry, I meant Dev/Test environment. Think CI/CD.
upvoted 1 times
...
zr79
2 years, 1 month ago
Microsoft decided on an exception for recovery vaults. it's weird but you can not delete your RG before deleting your vaults
upvoted 7 times
...
...
mabdullah
1 year, 4 months ago
Thanks.
upvoted 2 times
...
...
Dips88
Highly Voted 2 years, 12 months ago
Answer should be B. A recovery service vault can not deleted unless all its backups are deleted permanently. And along with that definitely resource lock has to be removed on vnet
upvoted 123 times
poplovic
2 years, 10 months ago
Tried in the lab, a lot of steps to remove the vault. https://docs.microsoft.com/en-us/azure/backup/quick-backup-vm-portal https://docs.microsoft.com/en-us/azure/backup/backup-azure-security-feature-cloud#permanently-deleting-soft-deleted-backup-items
upvoted 1 times
...
rawrkadia
2 years, 9 months ago
Disagree. The more I think about this, the less "delete all data" makes sense as step one. Step one is to modify the VM's backup configuration, but A doesn't make sense either. I actually think they're correct. Easiest first step is to shut stuff off (not strictly needed) and remove the resource lock. Then disable soft-delete if on, remove the backup configuration for VM1 and any backups, then you can turn down the RG.
upvoted 4 times
...
mmNYC
2 years, 3 months ago
https://docs.microsoft.com/en-us/azure/backup/backup-azure-delete-vault?tabs=portal vault manuall deleted because it stays there 14 days.. B , is corect unswer, if it was sql you need to shutdown sql instances for backup
upvoted 2 times
...
mmtechsolutionsinc
2 years, 2 months ago
true but q is what is first, vm off, delete off, then go to recovery service emty it, then remove RG
upvoted 3 times
[Removed]
2 years, 1 month ago
Don't need to turn VM off to delete it.
upvoted 3 times
...
...
...
_gio_
Most Recent 1 month ago
Selected Answer: C
C or D. Before deleting resource group, you must first solve this problem: - you can't delete a virtual network with subnets that are still in use by a virtual machine. - you can't delete recovery service vault with backupped data inside
upvoted 2 times
...
Cg007
1 month, 2 weeks ago
Selected Answer: C
C. Turn off VM1 and remove the resource lock from VNET1 Before deleting the resource group TestRG, it's essential to ensure that all resources within it are in a state that allows for their deletion. Turning off VM1 and removing any resource locks from VNET1 would prepare the resources for deletion without causing any data loss or leaving resources in a locked state.
upvoted 1 times
...
jecampos2
2 months, 1 week ago
I would say the correct ans is C, but you could also think the B is OK. The question is. Once we execute the delete resource group action it will automatically turn off the VM1? If yes, then the ans should be B. Please advise
upvoted 1 times
...
Amir1909
2 months, 1 week ago
B is correct
upvoted 1 times
...
HdiaOwner
2 months, 2 weeks ago
Answer should be B
upvoted 1 times
...
MYR55
3 months, 3 weeks ago
3 steps which has to be done before we can delete the resource group -> Stop the back up of VM -> Delete all locks on resources of rg -> Empty the vault based on this, B seems to be the best option.
upvoted 2 times
...
MentalTree
4 months, 2 weeks ago
Correct Answer: C Question is what should you DO FIRST: -First you turn off the VM and remove the resource lock -Once VM is off you can modify the back config -Once backup config is remove you can remove backups from vault -Once vault is empty you can remove the TestRG. Key point being that of the choices, C which includes turning off the VM HAS to be done first before anything else can be done.
upvoted 3 times
MentalTree
4 months, 2 weeks ago
Ignore what I said about backup config xD The VM has to be off so that it is not using the subnet associated with the vnet: "you can't delete a virtual network with subnets that are still in use by a virtual machine" https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/delete-resource-group?tabs=azure-powershell#required-access-and-deletion-failures
upvoted 2 times
[Removed]
4 months, 2 weeks ago
The questions states that you need to delete the Resource Group, so there is no need to delete each component individually. You can do a delete on the entire resource group and it will also get rid of all the resources. The trick here is that you have a resource lock in place that prevents you from deleting it (in this case the vault) and also a recovery services vault that has backup data in in which again cannot be deleted. You first need to solve these two problems before simply deleting the entire resource group and everything in it, in one go.
upvoted 1 times
...
...
...
ziggy1117
5 months, 3 weeks ago
Selected Answer: B
You do not need to turn off VMs to delete them. I made so many of those studying for AZ104 and i never had to turn off any VM before deleting it. Also you need to delete the contents of a vault before you can delete it. There is actually a lenghty checklist of things you need to do in the vault before you can delete it besides deleting its backup.
upvoted 2 times
...
mattpaul
6 months ago
I passed with these questions and many friends passed too, all questions appeared in the real exam a great study resource, contact me on [email protected]
upvoted 1 times
...
mattpaul
6 months ago
I passed with these questions and many friends passed too, all questions appeared in the real exam a great study resource, contact me on [email protected]
upvoted 1 times
...
pal40sg
6 months, 2 weeks ago
Selected Answer: D
What should you do **first**? The answer is D. Turn off VM1 and delete all data in Vault1. This is the correct answer because the question asks what should be deleted first before deleting TestRG. According to the current web page context, TestRG contains a virtual machine named VM1, a virtual network named VNET1, and a recovery services vault named Vault1. The web page context also states that VM1 is connected to VNET1 and that Vault1 contains backup data for VM1. Therefore, before deleting TestRG, we need to delete the resources that depend on it or have a resource lock. In this case, VM1 depends on VNET1 and Vault1 has a resource lock. To delete VM1, we need to turn it off first. To delete Vault1, we need to delete all the data in it first. Therefore, the first step is to turn off VM1 and delete all data in Vault1.
upvoted 2 times
...
TedM2
6 months, 2 weeks ago
Selected Answer: B
It has to be "B". Deleting an RG includes deleting any recovery vault that is in it, and this article clearly states that you cannot delete the vault if it contains data: https://learn.microsoft.com/en-us/azure/backup/backup-azure-delete-vault?tabs=portal The delete lock also needs to be removed as by definition it blocks deletion of the locked resource.
upvoted 1 times
...
mark55665
6 months, 3 weeks ago
Selected Answer: A
Answer should be A, you must stop backup and delete resource lock before you can delete RG
upvoted 3 times
...
bechidu
7 months ago
Selected Answer: B
The answer should be B, In order to delete the RG, delete lock has to be removed and the vault data needs to be cleared
upvoted 2 times
...
sjsaran
7 months ago
Answer should be A Recovery Vault can not be deleted when there is an active backup and the delete lock need to be removed from VNet
upvoted 3 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 ...