[libvirt] dnsmasq didn't work as except

hi all The vm created by libvirtd can not acquire a ip from dnsmasq. nobody 14203 1 0 21:31 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --listen-address 192.168.122.1 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases --dhcp-lease-max=253 --dhcp-no-override note that --conf-file= is empty ,is there any thing I missing? thanks Eli.

On 10.07.2012 15:55, taget@linux.vnet.ibm.com wrote:
hi all The vm created by libvirtd can not acquire a ip from dnsmasq.
nobody 14203 1 0 21:31 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --listen-address 192.168.122.1 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases --dhcp-lease-max=253 --dhcp-no-override
note that --conf-file= is empty ,is there any thing I missing?
No. That's intentional.
thanks Eli.
Well, maybe somebody is throwing away your DHCP requests. This command line doesn't look suspicious to me. Michal.

On 07/10/2012 09:55 PM, taget@linux.vnet.ibm.com wrote:
hi all The vm created by libvirtd can not acquire a ip from dnsmasq.
nobody 14203 1 0 21:31 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --listen-address 192.168.122.1 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases --dhcp-lease-max=253 --dhcp-no-override
note that --conf-file= is empty ,is there any thing I missing?
Nothing is missing. what does virsh net-list, virsh net-dumpxml default and virsh dumpxml <your guest> say? please make sure your guest is using 'default' network. In addition, please show your libvirt, kvm and dnsmasq verstion, thanks.
thanks Eli.
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On 07/10/2012 09:55 PM, taget@linux.vnet.ibm.com wrote:
hi all The vm created by libvirtd can not acquire a ip from dnsmasq.
nobody 14203 1 0 21:31 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --listen-address 192.168.122.1 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases --dhcp-lease-max=253 --dhcp-no-override
note that --conf-file= is empty ,is there any thing I missing?
Options for dnsmasq can be set either on the command line when starting dnsmasq, or in its configuration file, /etc/dnsmasq.conf(if it exists) --config-file=<empty> means explicitly not to accept any configure file. what kind of OS tht vm is. The possible way for vm to do is to release old lease and get a new lease from dnsmasq again linux guest: dhclient -r, then dhclient <ethX> windows guest: ipconfig /release, then ipconfig /renew Guannan Ren

On 07/10/2012 09:55 AM, taget@linux.vnet.ibm.com wrote:
hi all The vm created by libvirtd can not acquire a ip from dnsmasq.
There's nothing wrong with the dnsmasq commandline. Before anything else, try restarting libvirtd. This will reload the iptables rules that libvirtd installs to (among other things) allow incoming dhcp requests from guests to the host. Some other program messing with the iptables rules is the most common cause of this problem. For a couple other possibilities, you can look at the following entry in the libvirt troubleshooting guide: http://wiki.libvirt.org/page/PXE_boot_%28or_dhcp%29_on_guest_failed (If you find a root cause different from the 3 listed there, please edit the page to add your findings). For future reference, here's the toplevel of the troubleshooting guide: http://wiki.libvirt.org/page/Troubleshooting
participants (5)
-
Alex Jia
-
Guannan Ren
-
Laine Stump
-
Michal Privoznik
-
taget@linux.vnet.ibm.com