Azure 虚拟网络删除问题

问题描述 投票:0回答:1

我正在尝试在azure控制台中删除虚拟网络和子网,但它给我的响应是子网正在使用中,如何强制删除资源。

我尝试手动删除并使用azure cli,但问题仍然存在。

azure cloud
1个回答
0
投票

当我运行注释来删除 vnet 时,我遇到了相同的错误

subnet is in use
,如下所示

(InUseSubnetCannotBeDeleted) Subnet sub1 is in use by /subscriptions/209654ebxxxxxxx/resourceGroups/KHAN/providers/Microsoft.Network/networkInterfaces/VM2479/ipConfigurations/IPCONFIG1 and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet. See aka.ms/deletesubnet. Code: InUseSubnetCannotBeDeleted Message: Subnet sub1 is in use by /subscriptions/209654eb-1xxxxxxx/resourceGroups/KHAN/providers/Microsoft.Network/networkInterfaces/VM2479/ipConfigurations/IPCONFIG1 and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet. See aka.ms/deletesubnet.

enter image description here

当存在仍与您尝试删除的子网或虚拟网络关联的依赖项或资源时,通常会发生此错误。

这可能包括虚拟机、网络接口、网络安全组、路由表、堡垒或其他资源。

在设置下的虚拟网络中,

connected devices
在我的情况下网络接口已连接。

在该网络接口中,我的 vnet/子网已关联,并且网络接口已附加到虚拟机。确保删除该虚拟机和网卡或分离网络接口。

现在,当我成功运行命令 vnet delete 时,如下所示:

az network vnet delete --resource-group myResourceGroup --name myVNet

enter image description here

enter image description here

参考

创建、更改或删除 Azure 虚拟网络 |微软学习

© www.soinside.com 2019 - 2024. All rights reserved.