我们有一个在 Proxmox 6.3 上运行的 Ubuntu Server 16.04.7 虚拟机。
重新启动主机时,该机器出现“空”状态/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
如果我随后重新启动该虚拟机,/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 192.168.100.10
nameserver 192.168.100.11
search domain.com
/etc/network/interfaces
如下:
auto lo
iface lo inet loopback
auto ens18
iface ens18 inet static
address 192.168.100.189
netmask 255.255.255.0
network 192.168.100.0
broadcast 192.168.100.255
gateway 192.168.100.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.100.10 192.168.100.11
dns-search domain.com
resolvconf
已安装,我找不到此安装与我们拥有的许多其他虚拟机之间的任何有意义的差异。/etc/resolvconf
此机器上的内容与同一节点上的另一台工作机器相同;我们没有编辑文件resolv.conf.d
。
我们也在这个节点上运行keepalived
,配置如下:
vrrp_instance VI_1 {
state BACKUP
interface ens18
virtual_router_id 188
priority 150
advert_int 1
notify /script/to/start/and/stop/fetchmail
virtual_ipaddress {
192.168.100.188
}
}
基本上/script/to/start/and/stop/fetchmail
就像它所说的那样:根据该节点是否是主节点来启动和停止 fetchmail 的脚本。
我该从哪里开始寻找解决(故意双关语!)这个问题呢?