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

Exam AZ-104 All Questions

View all questions & answers for the AZ-104 exam

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: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
mlantonis
Highly Voted 3 years, 4 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 291 times
Gyanshukla
3 years, 1 month ago
correct
upvoted 2 times
...
monus
3 years ago
backup can be taken even if vm is powered off. so, I think the answer is A.
upvoted 11 times
...
AubinBakana
3 years, 1 month 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
3 years, 1 month ago
sorry, I meant Dev/Test environment. Think CI/CD.
upvoted 1 times
...
zr79
2 years, 7 months ago
Microsoft decided on an exception for recovery vaults. it's weird but you can not delete your RG before deleting your vaults
upvoted 8 times
...
...
mabdullah
1 year, 9 months ago
Thanks.
upvoted 2 times
...
...
Dips88
Highly Voted 3 years, 5 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 125 times
poplovic
3 years, 3 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
3 years, 2 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, 8 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, 7 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
...
...
Mazinger
Most Recent 2 weeks, 2 days ago
Selected Answer: B
B. Remove the resource lock from VNET1 and delete all data in Vault1. Before you can delete TestRG, you must remove any dependencies that are associated with the resources in TestRG. In this scenario, VNET1 has a resource lock of type delete, which means it cannot be deleted until the resource lock is removed. Additionally, Vault1 contains backups of VM1, so you must delete all the data in Vault1 before deleting TestRG. To do this, you can follow these steps: 1. Navigate to the VNET1 resource in the Azure portal. 2. Under Settings, select Locks. 3. Select the delete lock for VNET1 and then click Delete. 4. Navigate to the Vault1 resource in the Azure portal. 5. Delete all the backup data associated with VM1. 6. After all backup data has been deleted, delete Vault1. 7. Once VNET1 and Vault1 are deleted, you can delete TestRG. By removing the resource lock from VNET1 and deleting all data in Vault1, you ensure that all dependencies associated with TestRG have been removed before deleting the resource group.
upvoted 5 times
...
SeMo0o0o0o
1 month ago
Selected Answer: B
it´s B
upvoted 1 times
...
CheMetto
2 months, 1 week ago
Selected Answer: B
C and D is wrong, you don't need to turn off VM. Both A and B are not correct but B is more correct than A, let me explain: One of the first thing to do is to remove the resource lock, which is done only from B. A doesn't Remove the resource lock but edit it. You can edit a resource lock and switch between delete and read-only ( read-only is you can't delete, and you can't modify, delete has only delete lock, you can modify the resource). So This is where A is wrong. To delete a backup, you can't go in the vault and delete it, before do that, you need to go to stop backup, then you can delete all backup, so that's why B is incorrect, is missing 1 step. This step is not mentioned in A too, it says modify backup configuration. Backup configuration mean how many time i took the backup, retain, snapshot etc, but it doesn't stop the backup, you need to do that from backup item.
upvoted 3 times
...
Charumathi
3 months, 3 weeks ago
B is the correct answer, 1. Remove VM Backup from Recovery Services Vault Stop Backup: First, stop the backup for the VM in the Recovery Services vault. Navigate to the Recovery Services vault. Go to "Backup items". Select the VM. Click "Stop backup". Choose the option to "Retain data" or "Delete backup data". If you choose to retain data, you must delete it later from the backup data. Delete Backup Data (if chosen earlier): In the Recovery Services vault, go to "Backup items". Select the VM. Click "Delete backup data". 2. Remove the Delete Lock on vNet Navigate to the vNet that has the delete lock. Go to "Locks" under the "Settings" section. Select the delete lock and remove it. 3. Delete the Resource Group Navigate to the Resource Group containing the VM, Recovery Services vault, and vNet. Click "Delete Resource Group". Confirm the deletion by typing the resource group name when prompted.
upvoted 1 times
...
3c5adce
4 months, 4 weeks ago
B. Remove the resource lock from VNET1 and delete all data in Vault1 is the most direct and comprehensive approach to prepare the resource group for deletion, assuming you manage data deletion carefully to prevent unwanted loss. Removing resource locks is necessary to allow deletion, and clearing Vault1 ensures there are no leftover dependencies that could halt the process. Thus, removing the resource lock is the critical first step, which is covered in this option.
upvoted 1 times
...
3c5adce
4 months, 4 weeks ago
B. Remove the resource lock from VNET1 and delete all data in Vault1
upvoted 1 times
...
_gio_
6 months, 2 weeks 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
7 months 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 2 times
...
jecampos2
7 months, 3 weeks 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
7 months, 3 weeks ago
B is correct
upvoted 1 times
...
HdiaOwner
8 months ago
Answer should be B
upvoted 1 times
...
MYR55
9 months, 1 week 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
10 months 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
10 months 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
...
...
ziggy1117
11 months 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 3 times
...
pal40sg
12 months 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
...
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 ...