更改 Azure VM 上的 DNS 后缀

Change DNS suffix on Azure VM

我试图在 Azure 中部署一个 Windows VM,它将作为 运行 DNS 用于解析我的 VNet 中的专用区域。我已经创建了 VNet,并将 VM 的 IP 地址设置为 VNet 的 DNS 服务器。由于我为 VNet 配置了专用 DNS 服务器,因此 VM 获得 reddog.microsoft.com 的占位符后缀。我在 VM 上安装 DNS 并创建我的正向和反向区域。由于 VNet 中的 VM 不会加入域,我将 DDNS 配置为允许不安全的更新。除了为 VM 运行 DNS 手动注册记录外,我无法让它注册记录。当我尝试更改 NIC 上的 DNS 后缀时,只要我在 NIC 属性 window 上单击“确定”,我的连接就会被终止,我无法再回到虚拟机中。此时我唯一能做的就是摧毁它并重新开始。我在这里错过了什么?我是否必须为我放入 VNet 的任何内容手动注册记录?

更新

来自关于 Name resolution that uses your own DNS server 的文档:

When you are using Azure-provided name resolution, Azure Dynamic Host Configuration Protocol (DHCP) provides an internal DNS suffix (.internal.cloudapp.net) to each VM. This suffix enables hostname resolution because the hostname records are in the internal.cloudapp.net zone. When you are using your own name resolution solution, this suffix is not supplied to VMs because it interferes with other DNS architectures (like domain-joined scenarios). Instead, Azure provides a non-functioning placeholder (reddog.microsoft.com).

它说您的自定义 DNS 后缀未提供给 VM,因为它会干扰其他 DNS 架构(例如加入域的情况)。此外,Azure 没有直接在您的 DNS 服务器中创建记录的凭据。 Azure 将主 DNS 后缀留空,您可以在 VM 中设置后缀,如下图:

更改DNS后缀后,重启虚拟机,即可在提示命令输出的DNS后缀搜索列表中看到新的DNS后缀。

转到DNS 服务器,您会看到DNS 记录已更新。在此之前,请确保您已在区域属性中启用动态更新的非安全和安全。