基本信息:
Region: us-west1
Zone: us-west1-a
DNS internal IP address: 10.36.2.15 (Windows Server2016, created from marketplace image)
VCP name: Default我遵循下面的链接配置外部DNS在谷歌云平台.
https://cloud.google.com/migrate/compute-engine/docs/4.2/how-to/networking/using-external-dns
但我认为google云平台并不使用给定的meata数据密钥,它的Velostrata使用这些键配置DNS。
另一种方法是在"Cloud“-> "DNS服务器策略”下添加外部DNS配置。
步骤,遵循google云平台:中配置的外部DNS。
us-west1_dns-domain-name: abc.com
us-west1_dns-domain-suffixes: abc.com
us-west1_dns-servers: 10.36.2.15 Name: gcp-dns-server1
Inbound query forwarding : off
Alternate DNS servers (Optional)" : 10.36.2.15
Networks: Default。
现在,当我在“默认”子网中创建一个新的虚拟机并选中“/etc/
#$ cat /etc/c.my#由NetworkManager Searchc.my生成。内部google.internal名称服务器169.254.169.254 #$ cat /etc/host 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 :1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.36.2.23 test4.c.my-project.project.inaltest4#由Google 169.254.169.254 metadata.google.internal #添加。
VM成功地在网络上出现,并能够平DNS.。
。
注意:当我在“/etc/rupv.conf”中手动给DNS "10.36.2.15“时,它的工作状态很好,具有预期的名称分辨率。这意味着没有端口问题,VM可以成功地与DNS通信。
我需要的是VM应该在启动时自动使用外部DNS,并且条目应该反映在google-云平台的VM中的“/etc/rupv.conf”。dhclient文件也有内部DNS条目。
有没有办法告诉google云平台使用外部配置的DNS (或覆盖内部DNS条目),并在VM上(启动时或dhclient服务刷新时)使用外部DNS自动更新“/etc/ boot”?
发布于 2021-07-27 13:31:21
当文档声明"..To使用外部DNS而不转发到Cloud时,您需要手动为VM配置名称解析“。
在回顾了您的步骤之后,我注意到您可能忘记将以下一行添加到c:\Windows\System32 32\Driver\etc\host。
169.254.169.254 metadata.google.internal
请检查正式文件1中的设置。
巴勃罗。
https://stackoverflow.com/questions/68191016
复制相似问题