Changing DNS Server ( nameserver ) added to /etc/resolv.conf on instances

asked 2015-02-09 10:15:17 -0600

Poonam Agarwal gravatar image

updated 2015-02-09 10:23:55 -0600

I am using Openstack Havana Ubuntu setup with one Controller Node and 10 Compute Nodes. Its a flat DHCP nova-network setup and neutron is not in use. By default the instances created on any of the compute nodes has the DNS "nameserver" as the flat DHCP Domain & Caching nameserver IP as the gateway IP i.e similar to as below

cat /etc/resolv.conf
search novalocal

If i have a private DNS Server for my network and I do not want to the use the caching name server created by Nova as an default , are there ways of configuring the DNS Server on the hypervisor so that the instances have the "nameserver" populated as the private DNS entries by default instead of the caching DNS nameserver / Gateway entry?

I have tried adding dns_server = <my private="" dns=""> but it only seems to define the dns servers dnsmasq should be using to update the caching name server. The created instances still seem to point to the caching DNS server/Gateway IP. I was able to change the search parameter by updating the dhcp_domain parameter in /etc/nova/nova.conf. But havent had any luck changing the "nameserver" entry populated on the instances by default.

Anyone else has come across a similar problem?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-02-10 03:03:10 -0600

Poonam Agarwal gravatar image

Hello, Thanks for your feedback. I am not using Neutron Networking . Its a flat DHCP nova network.

edit flag offensive delete link more

answered 2015-02-09 13:47:21 -0600

larsks gravatar image

The DNS server information provided to your instances by the DHCP server is set using the --dns-nameserver parameter when you create a subnet with neutron subnet-create.

You can modify this value on an existing subnet by running:

neutron subnet-update <subnet-id> --dns-nameservers list=true <ns_ip_1> <ns_ip_1> ...


neutron subnet-update  3bd2c778-9402-4447-b0ab-b797e7ea289d --dns-nameservers list=true
edit flag offensive delete link more


Thanks a lot. You solved my problem..

imarijitbose gravatar imageimarijitbose ( 2015-11-08 13:34:22 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-02-09 10:15:17 -0600

Seen: 10,537 times

Last updated: Feb 09 '15