inject search domain into resolv.conf of VM

asked 2017-03-01 07:12:49 -0500

stebujak gravatar image

Hello,

how is it possible to inject another search domain as openstacklocal in the resolv.conf of a VM. We use Newton with neutron.

Greets

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2017-05-15 08:33:04 -0500

I just had the same problem and I found a quick&dirty solution:

Just edit the /etc/neutron/dnsmasq-neutron.conf file and add at the bottom

domain=yourdomain.example.com

and then, restart the dhcp-agent by executing:

systemctl restart neutron-dhcp-agent

From now on, your instances should be getting that search domain on new dhcp requests.

I also tried the "dns_domain =" option on /etc/neutron/neutron.conf but it does not work. If some neutron guru has a more "openstack"-y solution, that would be great.

edit flag offensive delete link more
0

answered 2017-05-15 09:02:47 -0500

updated 2017-05-15 09:04:05 -0500

Or use cloud-init. Open http://cloudinit.readthedocs.io/en/la... and scroll down to Configure an instances resolv.conf.

Of course, the image must have cloud-init enabled. Note that Cirros doesn't, but you can inject shell scripts into Cirros instances.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-03-01 07:12:49 -0500

Seen: 1,127 times

Last updated: May 15 '17