On 2012年09月13日 11:23, Marwan Tanager wrote:
Hi. I have a machine with a local DHCP server and a couple of virtual networks and I've configured the server for each virtual interface, so that I would be able to install VMs on the corresponding subnets using PXE. The problem is that the two DHCP servers (my local server and dnsmasq) are conflicting with each other causing the boot process to either fails or takes ages untill a VM can catch the PXE parameters. Note this output upon starting two VMs on two different subnets: ----------------------------------------------------------------------------- tail -n1 -f</var/log/syslog | egrep -i "dhcpd|dnsmasq-dhcp" Sep 13 05:11:25 host dhcpd: DHCPDISCOVER from 52:54:00:72:f0:e2 via virbr0 Sep 13 05:11:25 host dhcpd: DHCPDISCOVER from 52:54:00:2a:e0:a6 via virbr1 Sep 13 05:11:26 host dhcpd: DHCPOFFER on 192.168.122.194 to 52:54:00:72:f0:e2 via virbr0 Sep 13 05:11:26 host dhcpd: DHCPOFFER on 192.168.100.107 to 52:54:00:2a:e0:a6 via virbr1 Sep 13 05:11:27 host dhcpd: DHCPREQUEST for 192.168.122.194 (192.168.122.1) from 52:54:00:72:f0:e2 via virbr0 Sep 13 05:11:27 host dhcpd: DHCPACK on 192.168.122.194 to 52:54:00:72:f0:e2 via virbr0 Sep 13 05:11:28 host dnsmasq-dhcp[1882]: DHCPDISCOVER(virbr1) 52:54:00:2a:e0:a6 Sep 13 05:11:28 host dnsmasq-dhcp[1882]: DHCPOFFER(virbr1) 192.168.100.251 52:54:00:2a:e0:a6 Sep 13 05:11:28 host dhcpd: DHCPREQUEST for 192.168.100.251 (192.168.100.1) from 52:54:00:2a:e0:a6 via virbr1: unknown lease 192.168.100.251. Sep 13 05:11:28 host dnsmasq-dhcp[1882]: DHCPREQUEST(virbr1) 192.168.100.251 52:54:00:2a:e0:a6 Sep 13 05:11:28 host dnsmasq-dhcp[1882]: DHCPACK(virbr1) 192.168.100.251 52:54:00:2a:e0:a6 Sep 13 05:11:36 host dnsmasq-dhcp[1882]: DHCPDISCOVER(virbr1) 52:54:00:2a:e0:a6 Sep 13 05:11:36 host dnsmasq-dhcp[1882]: DHCPOFFER(virbr1) 192.168.100.251 52:54:00:2a:e0:a6 Sep 13 05:11:36 host dhcpd: DHCPDISCOVER from 52:54:00:2a:e0:a6 via virbr1 Sep 13 05:11:36 host dhcpd: DHCPOFFER on 192.168.100.107 to 52:54:00:2a:e0:a6 via virbr1 Sep 13 05:11:38 host dnsmasq-dhcp[1882]: DHCPREQUEST(virbr1) 192.168.100.107 52:54:00:2a:e0:a6 Sep 13 05:11:38 host dnsmasq-dhcp[1882]: DHCPNAK(virbr1) 192.168.100.107 52:54:00:2a:e0:a6 address not available Sep 13 05:11:38 host dhcpd: DHCPREQUEST for 192.168.100.107 (192.168.100.1) from 52:54:00:2a:e0:a6 via virbr1 Sep 13 05:11:38 host dhcpd: DHCPACK on 192.168.100.107 to 52:54:00:2a:e0:a6 via virbr1 Sep 13 05:11:53 host dhcpd: DHCPDISCOVER from 52:54:00:72:f0:e2 via virbr0 Sep 13 05:11:53 host dhcpd: DHCPOFFER on 192.168.122.194 to 52:54:00:72:f0:e2 via virbr0 Sep 13 05:11:53 host dhcpd: DHCPREQUEST for 192.168.122.194 (192.168.122.1) from 52:54:00:72:f0:e2 via virbr0 Sep 13 05:11:53 host dhcpd: DHCPACK on 192.168.122.194 to 52:54:00:72:f0:e2 via virbr0 Sep 13 05:12:00 host dhcpd: DHCPDISCOVER from 52:54:00:72:f0:e2 via virbr0 Sep 13 05:12:00 host dhcpd: DHCPOFFER on 192.168.122.194 to 52:54:00:72:f0:e2 via virbr0 Sep 13 05:12:00 host dhcpd: DHCPREQUEST for 192.168.122.194 (192.168.122.1) from 52:54:00:72:f0:e2 via virbr0 Sep 13 05:12:00 host dhcpd: DHCPACK on 192.168.122.194 to 52:54:00:72:f0:e2 via virbr0 Sep 13 05:12:03 host dhcpd: DHCPDISCOVER from 52:54:00:2a:e0:a6 via virbr1 Sep 13 05:12:03 host dhcpd: DHCPOFFER on 192.168.100.107 to 52:54:00:2a:e0:a6 via virbr1 Sep 13 05:12:03 host dhcpd: DHCPREQUEST for 192.168.100.107 (192.168.100.1) from 52:54:00:2a:e0:a6 via virbr1 Sep 13 05:12:03 host dhcpd: DHCPACK on 192.168.100.107 to 52:54:00:2a:e0:a6 via virbr1 Sep 13 05:12:06 host dnsmasq-dhcp[1882]: DHCPDISCOVER(virbr1) 52:54:00:2a:e0:a6 Sep 13 05:12:06 host dnsmasq-dhcp[1882]: DHCPOFFER(virbr1) 192.168.100.251 52:54:00:2a:e0:a6 Sep 13 05:12:06 host dnsmasq-dhcp[1882]: DHCPREQUEST(virbr1) 192.168.100.107 52:54:00:2a:e0:a6 Sep 13 05:12:06 host dnsmasq-dhcp[1882]: DHCPNAK(virbr1) 192.168.100.107 52:54:00:2a:e0:a6 address not available Sep 13 05:12:08 host dhcpd: DHCPDISCOVER from 52:54:00:2a:e0:a6 via virbr1 Sep 13 05:12:08 host dnsmasq-dhcp[1882]: DHCPDISCOVER(virbr1) 52:54:00:2a:e0:a6 Sep 13 05:12:08 host dnsmasq-dhcp[1882]: DHCPOFFER(virbr1) 192.168.100.251 52:54:00:2a:e0:a6 Sep 13 05:12:08 host dhcpd: DHCPOFFER on 192.168.100.107 to 52:54:00:2a:e0:a6 via virbr1 Sep 13 05:12:08 host dnsmasq-dhcp[1882]: DHCPREQUEST(virbr1) 192.168.100.107 52:54:00:2a:e0:a6 Sep 13 05:12:08 host dnsmasq-dhcp[1882]: DHCPNAK(virbr1) 192.168.100.107 52:54:00:2a:e0:a6 address not available Sep 13 05:12:08 host dhcpd: DHCPREQUEST for 192.168.100.107 (192.168.100.1) from 52:54:00:2a:e0:a6 via virbr1 Sep 13 05:12:08 host dhcpd: DHCPACK on 192.168.100.107 to 52:54:00:2a:e0:a6 via virbr1 ----------------------------------------------------------------------------- So, is there a way to stop dnsmasq from starting automatically when starting libvird? I haven't been able to see any trace of it in the init scripts, and my guessing is that it's started not as a service, but in an ad-hoc manner by libvirt-bin. Checking the dependencies of the libvirt-bin package, I've noticed that dnsmasq is among them. So, my question is whether, starting dnsmasq automatically is something that is hard coded in libvirt-bin or is it just started in some other way that I am not aware of?
No, to disable the autostarting of dnsmasq, you need to disable the autostart of network which drives dnsmasq (named 'default' by default). % virsh net-autostart --disable default Then it won't be started automatically along with libvirtd service next time. Regards, Osier _______________________________________________ libvirt-users mailing list libvirt-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvirt-users