
One of the most annoying thing is when the resolv.conf of your VM keeps changing because of the information sent by the DNSMASQ process. In this article, I assume that your setup has some conventions such as:
- One network per customer, with fixed_ips range with something like
10.100.$ID.0/24 - One ID (number) per tenant
First create a template file for your initial dhclient configuration file. Using a template file makes things easier to build base images.
1
| |
Then append the following lines in /etc/dhcp/dhclient.conf.template:
supersede domain-name-servers 10.100.X.254;
supersede domain-name "template.your-super-cloud.domain";
The above example shows my fixed_ips range. You might have to edit it with your own range.
Eventually edit your /etc/rc.local with the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
Enjoy!