Ask Your Question

inject search domain into resolv.conf of VM

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

stebujak gravatar image


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


edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

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

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

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

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

Or use cloud-init. Open 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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


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

Seen: 1,046 times

Last updated: May 15 '17