在 Azure 经典 VM 虚拟网络中禁用 VPN 网关

Disable VPN gateway in Azure classic VM virtual network

从 ASM 到 ARM 时,我意识到 "Configure point-to-site connectivity" 被 选中 (所以我们可以说 VPN 网关已配置)到网络设置即使我与 VPN 网关没有任何连接。

The network is in use 描述显示在旧门户中,并且在解除分配 VM 后仍然存在。取消选中然后保存操作会导致使用 PowerShell 命令和 Portal 出现预期的失败。

如何禁用此设置?我必须重新创建 VM 吗?

您是否在 VNET 上创建了 VPN 网关?如果是,需要先删除网关

您可以通过门户或 powershell 删除网关。

要获取 GatewayId,请运行命令Get-AzureVirtualNetworkGateway

然后我们可以使用命令删除网关 Remove-AzureVirtualNetworkGateway -GatewayId your_gateway_id