问题描述
删除虚拟机时,我希望虚拟机的相关资源也被删除(网络接口,公共IP等)
When I delete a VM I would expect its related resources to be deleted too (Network interface, public IP etc.)
之后手动删除单个资源很麻烦.删除资源组会删除所有内容,但是如果我不想删除该资源组中的其他VM,这不是一个选择.
Manually deleting the individual resources afterwards is cumbersome. Deleting the resource group would delete everything but this isnt an option if I have other VM's in the resource group I do not want to delete.
对此有更好的解决方案吗?
Is there a better solution for this?
推荐答案
1.删除资源组-这有助于在这里将资源组的范围缩小到尽可能小
1. Delete the resource group - it helps here to scope your resource groups as small as possible to help make this possible
2. Script something to delete teh VM and resources for you, a good example is here
有一个用户语音项目对此问题开放,因此您可能需要对此进行投票.
There is a uservoice item open for this issue so you may want to vote on that.
这篇关于删除具有所有关联资源的VM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!