azure - 如何将 Azure 经典 NSG 与经典 VM 分离?

标签 azure networking azure-virtual-machine

在 azure classic 中,我有一个附加到经典虚拟机的经典网络安全组。 我无法删除 NSG,因为它与虚拟机关联,但我没有看到任何将 NSG 从虚拟机分离的选项,也没有找到用于从虚拟机分离 NSG 的 PS 或 CLI 命令。 我是否需要删除虚拟机才能删除 NSG?

最佳答案

您可以使用 Power Shell 取消与 NSG 的关联并将其删除。

$vm=Get-AzureRmResource  -ResourceId "/subscriptions/<subscription id>/resourceGroups/shuiclassic/providers/Microsoft.ClassicCompute/virtualMachines/shui" -ApiVersion "2017-04-01"
$vm.Properties.networkProfile.networkSecurityGroup=""
 $vm|Set-AzureRmResource -Force

您也可以在 Azure 门户上执行此操作。

enter image description here

然后单击您的 NSG 并选择“无”。

enter image description here

点击保存,即可删除该NSG。

关于azure - 如何将 Azure 经典 NSG 与经典 VM 分离?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48426529/

相关文章:

javascript - Azure 移动服务中的 CORS 设置去哪里了

azure - 是否有一种安全的方式为用户提供 Azure 存储容器的共享访问签名 token ?

Azure VM 核心与 vCPU

c - inet_netof() 函数返回奇怪的值

http - 如何避免遇到最大打开文件限制

azure - 无法将 PIP 分配给现有 VM 引发错误 'PublicIP per Virtual Machine usage not allowed for this deployment.'

azure - 从 A 系列升级到 D 系列 Azure 虚拟机

c# - 通过 Azure Web 应用程序连接到 Google Sheets

asp.net - 在遇到性能问题之前,一个 Azure 实例上有多少用户?

C++ 游戏应用程序 UDP 与 TCP