【发布时间】:2019-04-21 23:21:12
【问题描述】:
这是我的实例上的cloud.cfg(我在配置我启动实例的ami 时手动篡改了它)
root@ip-10-17-0-121:~# cat /etc/cloud/cloud.cfg | grep -i resol -C 3
# Network configuration for ami
manage_resolv_conf: true
resolv_conf:
nameservers: ['10.11.4.1']
但是,鉴于以下情况,从未考虑到这一点:
# cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.17.0.2
search eu-west-1.compute.internal
我尝试过创建和不创建以下文件
# cat /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
network: {config: disabled}
【问题讨论】:
标签: amazon-web-services amazon-ec2 cloud cloud-init