In an OpenStack tenant that is not allowed to create a network with neutron net-create, the name server can be set via cloudinit. The resolv-conf module although documented in the examples is not always available. It can be worked around with
#cloud-config bootcmd: - echo nameserver 220.127.116.11 | tee /etc/resolvconf/resolv.conf.d/head - resolvconf -u
for Ubuntu or
#cloud-config bootcmd: - echo nameserver 18.104.22.168 | tee /etc/resolv.conf - sed -ie 's/PEERDNS="yes"/PEERDNS="no"/' /etc/sysconfig/network-scripts/ifcfg-eth0
One Reply to “Setting a custom name server on an OpenStack instance”
Comments are closed.