libvirt can't add host definitions to DHCP without network restart

Bug #584910 reported by Neil Wilson on 2010-05-24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)

Bug Description

libvirt networks need to be shutdown and restarted to add ranges and/or static mappings to the dhcp definition sections. This breaks service for those VM guests currently running.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: libvirt-bin 0.7.5-5ubuntu27
ProcVersionSignature: Ubuntu 2.6.32-22.33-server
Uname: Linux 2.6.32-22-server x86_64
Architecture: amd64
Date: Mon May 24 11:46:07 2010
InstallationMedia: Ubuntu-Server 10.04 LTS "Lucid Lynx" - Release amd64 (20100427)
 PATH=(custom, no user)
SourcePackage: libvirt

Neil Wilson (neil-aldur) wrote :
C de-Avillez (hggdh2) wrote :

Thank you for adding in the upstream bug reference. I am marking this Confirmed/Medium.

Changed in libvirt (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Id2ndR (id2ndr) wrote :

Try this that has been working for me when I added a name (in /etc/hosts host's file) to the IP used by the guess: $ sudo kill -HUP `pidof dnsmasq`

Howerver I get a different (related trouble): custom host definition is not honor with my configuration (even after rebooting the host). dnsmasq give a adress from the dhcp range to my VM.
Here is my config /etc/libvirt/qemu/networks/default.xml
  <bridge name="virbr%d" />
  <ip address="" netmask="">
      <range start="" end="" />
      <host mac="52:54:00:bf:0f:d0" name="test" ip="" />

sudo grep 52:54:00:bf:0f:d0 /etc/libvirt/qemu/*.xml
/etc/libvirt/qemu/test.xml: <mac address='52:54:00:bf:0f:d0'/>

Do you have any idea that may explain why this doesn't work ?

Id2ndR (id2ndr) wrote :

Ok in fact I founded why this was not working. I deleted and recreated my VM but there still was an entry corresponding to the old one in /var/lib/libvirt/dnsmasq/default.hostsfile. So I modified the MAC address and now it is working like a charm (after using HUP signal).

graemev (graeme-launchpad) wrote :

On the chance that it helps. I observed the following behavior:

in virsh

net-edit default
 ... add and entry (call this version 1)
net-destroy default
net-start default

/var/lib/libvirt/network/default.xml is changed but /var/lib/libvirt/dnsmasq/default.hostfile is NOT

net-edit default
 ... edit the MAC address on an unrelated (junk) entry (call this version 2)
net-destroy default
net-start default

Now /var/lib/libvirt/dnsmasq/default.hostfile is changed , but it reflects the file called version 1 above.

Seems to lag one version behind.

Serge Hallyn (serge-hallyn) wrote :

This should be fixed upstream since before 14.04, so marking fix released. if you still have this problem please comment so we can re-open.

Changed in libvirt (Ubuntu):
status: Confirmed → Fix Released
dino99 (9d9) wrote :

The redhat has been closed

Changed in libvirt:
importance: Unknown → Undecided
status: Unknown → New
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.