从 Azure VM 中删除首选 DNS

Remove preferred DNS from Azure VM

我已经在通过 RDP 连接的虚拟机上设置了首选 DNS,当然,现在我根本无法连接到那台机器。有什么方法可以将其从门户中删除,或者有其他方法可以做到这一点吗?谢谢

编辑:

我在尝试仅重置配置时遇到错误。

VM 'ImperialVM' has not reported status for VM agent or extensions. Please verify the VM has a running VM agent, and can establish outbound connections to Azure storage.

门户中有一个选项可以重置给定 Azure VM 的 RDP 连接设置。

Select Azure 门户中的 VM。向下滚动设置窗格到列表底部附近的支持 + 故障排除部分。单击 'Reset password' 按钮。将模式设置为仅重置配置,然后单击更新按钮:

Troubleshoot Remote Desktop connections to an Azure virtual machine.

我尝试了一件疯狂的事情,但它奏效了。显然,如果您将 VHD 从一个容器复制到另一个容器,网络配置会以某种方式丢失,我的 DNS 也会丢失。使用 Azure Explorer,复制它大约需要 2 秒,一个 127 GB 的 VHD。

希望对大家有所帮助。

如果您在 OS 级别更改了 DNS,唯一的选择是重置 NIC

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/reset-network-interface#reset-network-interface