Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 453254 - DHCP fails if running on a DHCP server
Summary: DHCP fails if running on a DHCP server
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-06-28 11:42 UTC by Tim Waugh
Modified: 2009-07-14 16:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-07-14 16:40:10 UTC

Attachments (Terms of Use)

Description Tim Waugh 2008-06-28 11:42:48 UTC
Description of problem:
If libvirt is running on a machine that already provides a DHCP server for a
local network, the dnsmasq DHCP server does not seem to receive BOOTPC packets
at all.

One way round this is to define a subnet for in
/etc/dhcpd.conf; however, the dhcp service starts up before libvirtd, and this
means that the interface does not yet exist.  As a result it is ignored by dhcpd.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Install libvirt on a machine that is already acting as a DHCP server
2.Run a guest
Actual results:
The guest cannot obtain an IP address.

Expected results:
The guest obtains an IP address from  If necessary, this can
be achieved by removing the 'dhcp' tag from
/etc/libvirt/qemu/networks/default.xml and defining a subnet clause in

Comment 1 Bill C. Riemers 2008-09-04 08:22:12 UTC
I just ran into a slight variation of this problem.  It seems libvirt won't start dhcp for the virtual subnet if dnsmasq is already running.   I was only running dnsmasq for DNS and not for DHCP on interface=lo.   I was able to resolve the problem by adding in interface=virbr0 to my dnsmasq.conf, and appropriate dhcp settings for that interface.

It seems to me rather than trying to make libvirt handle all possible conflicts, a simple and acceptable solution would be to at least notify the user of the conflict and point them to an FAQ or such on how to solve it.


Comment 2 Daniel Berrange 2009-01-22 13:14:19 UTC
libvirt is already doing the maximum it can do to avoid conflicting, by making sure its own dnsmasq instance only binds to explicit IP addresses. If there's an existing DHCP daemon bound to all IPs, its pretty much game over for what we need to be able to provide. I'm not sure there's an easy way for us to detect the problem either - since DHCP is UDP based, we can't do a simple  'connect()' call to check if something's on the port - connect() always works for UDP regardless of whether anything's listening.

There is also no easy way to get feedback to the user, because the conflict will typically  occurr during machine startup, where there's no useful UI  - we can't block the initscript waiting to see if dnsmsaq starts OK, because that unacceptably delays the boot process.

Comment 3 Tim Waugh 2009-01-22 13:26:33 UTC
Perhaps the answer is to make dhcpd allow configuration for interfaces that do not exist at start-up, and apply that configuration if those interfaces appear during runtime.

Comment 4 Bug Zapper 2009-06-10 01:49:01 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here:

Comment 5 Bug Zapper 2009-07-14 16:40:10 UTC
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.