<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 1, 2015 at 6:05 AM, Simon Kelley <span dir="ltr"><<a href="mailto:simon@thekelleys.org.uk" target="_blank">simon@thekelleys.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":rq" class="" style="overflow:hidden">I just checked in code which supports<br>
<br>
- --dhcp-hostsdir (as before) but also<br>
<br>
- --dhcp-optsdir<br>
- --hostsdir<br>
<br>
to allow automatic reads of new DHCP options, and host IP addresses<br>
(like /etc/hosts)<br>
<br>
That should be what you need, if I understood right.<br><span class=""><br></span></div></blockquote></div><div class="gmail_extra"><br></div>Thanks Simon! But I am afraid it doesn't work as your expected. I rebuilt the dnsmasq from latest upstream and moved all VMs' config files into folders.</div><div class="gmail_extra"><br></div><div class="gmail_extra">When I create new VM, the VM can't get IP address through dhclient. </div><div class="gmail_extra"><br></div><div class="gmail_extra">From dnsmasq.log, it said:</div><div class="gmail_extra">Feb  2 16:00:24 dnsmasq-dhcp[1661]: DHCPDISCOVER(eth2) fa:15:24:50:50:00 no address available</div><div class="gmail_extra"><br></div><div class="gmail_extra">Then after I kill the dnsmasq process and restart it by: `pkill dnsmasq; dnsmasq`, I redo the dhclient eth0 in VM. The VM can get the IP Address successfully. The dnsmasq.log looks like:</div><div class="gmail_extra"><br></div><div class="gmail_extra">Feb  2 16:01:51 dnsmasq[1661]: exiting on receipt of SIGTERM</div><div class="gmail_extra">Feb  2 16:01:55 dnsmasq[1727]: started, version 2.73test5-8-g1062667 cachesize 150</div><div class="gmail_extra">Feb  2 16:01:55 dnsmasq[1727]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify</div><div class="gmail_extra">Feb  2 16:01:55 dnsmasq-dhcp[1727]: DHCP, static leases only on 10.11.0.1, lease time 1h</div><div class="gmail_extra">Feb  2 16:01:55 dnsmasq[1727]: reading /etc/resolv.conf</div><div class="gmail_extra">Feb  2 16:01:55 dnsmasq[1727]: using nameserver 10.0.101.1#53</div><div class="gmail_extra">Feb  2 16:01:55 dnsmasq[1727]: read /etc/hosts.dnss/fa:e1:c4:ea:eb:00 - 1 addresses</div><div class="gmail_extra">Feb  2 16:01:55 dnsmasq[1727]: read /etc/hosts.dnss/fa:15:24:50:50:00 - 1 addresses</div><div class="gmail_extra">Feb  2 16:01:55 dnsmasq-dhcp[1727]: read /etc/hosts.dhcps//fa:e1:c4:ea:eb:00</div><div class="gmail_extra">Feb  2 16:01:55 dnsmasq-dhcp[1727]: read /etc/hosts.dhcps//fa:15:24:50:50:00</div><div class="gmail_extra">Feb  2 16:01:55 dnsmasq-dhcp[1727]: read /etc/hosts.options//fa:e1:c4:ea:eb:00</div><div class="gmail_extra">Feb  2 16:01:55 dnsmasq-dhcp[1727]: read /etc/hosts.options//fa:15:24:50:50:00</div><div class="gmail_extra">Feb  2 16:02:08 dnsmasq-dhcp[1727]: DHCPDISCOVER(eth2) 192.168.122.40 fa:15:24:50:50:00</div><div class="gmail_extra">Feb  2 16:02:08 dnsmasq-dhcp[1727]: DHCPOFFER(eth2) 10.11.50.91 fa:15:24:50:50:00</div><div class="gmail_extra">Feb  2 16:02:08 dnsmasq-dhcp[1727]: DHCPREQUEST(eth2) 10.11.50.91 fa:15:24:50:50:00</div><div class="gmail_extra">Feb  2 16:02:08 dnsmasq-dhcp[1727]: Ignoring domain <a href="http://test.org">test.org</a> for DHCP host name 10-11-50-91</div><div class="gmail_extra">Feb  2 16:02:08 dnsmasq-dhcp[1727]: DHCPACK(eth2) 10.11.50.91 fa:15:24:50:50:00 10-11-50-91</div><div class="gmail_extra">  </div><div class="gmail_extra"><div>What wrong is it?</div><div><br></div>-- <br><div class="gmail_signature">Yongkang You</div>
</div></div>