Internal error starting virtual network 'default': virbr%d syntax not working

Bug #350780 reported by Anders Kaseorg
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
High
Soren Hansen
Jaunty
Fix Released
High
Soren Hansen
virt-manager (Ubuntu)
Invalid
Undecided
Unassigned
Jaunty
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: virt-manager

I am using Jaunty amd64 with all updates (2009-03-29).

If I create a new VM using the “localhost (User)” connection, I am not presented with any networking options, and cannot use anything other than userspace networking.

If I add myself to the libvirtd group and create a new VM using the “localhost (System)” connection, I can choose between “Virtual network” and “Shared physical device”. Since all of the shared physical devices in the menu are grayed out with “(Not bridged)”, my only option is “Virtual network”, and the only network I can select is “default (Inactive)”.

If I then click “Forward”, I get this dialog box:

Virtual Network is Inactive
Virtual Network 'default' is not active. Would you like to start the network now?
[No] [Yes]

Upon clicking “Yes”, I receive this error:

Uncaught error validating input: internal error 'brctl setfd virbr%d 0' exited with non-zero status 1 and signal 0: set forward delay failed: No such device
Details:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 302, in forward
    if(self.validate(notebook.get_current_page()) != True):
  File "/usr/share/virt-manager/virtManager/create.py", line 1079, in validate
    net.create()
  File "/usr/lib/python2.6/dist-packages/libvirt.py", line 612, in create
    if ret == -1: raise libvirtError ('virNetworkCreate() failed', net=self)
libvirtError: internal error 'brctl setfd virbr%d 0' exited with non-zero status 1 and signal 0: set forward delay failed: No such device

Perhaps this is a bad interaction with libvirt-0.6.1/debian/patches/dynamic_bridge_names.patch, which introduces the virbr%d syntax?

Revision history for this message
Anders Kaseorg (andersk) wrote :

The problem goes away if I replace virbr%d with virbr0 in /etc/libvirt/qemu/networks/default.xml. That lets the “default” network start up as active rather than inactive.

Revision history for this message
Schorschi (schorschi) wrote :

Is the bug being assigned or worked? Just happens on Jaunty Beta as well. Really hate tweaking the default.xml manually.

Revision history for this message
Mathias Gug (mathiaz) wrote :

Confirming. The default configuration shipped with libvirt doesn't work.

 Anders workaround works: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/350780/comments/1

Changed in libvirt (Ubuntu):
importance: Undecided → High
status: New → Triaged
milestone: none → ubuntu-9.04
summary: - Internal error starting virtual network 'default'
+ Internal error starting virtual network 'default': virbr%d syntax not
+ working
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

The Anders workaround does NOT works for me. My /etc/libvirt/qemu/networks/default.xml has the following:

<network>
  <name>default</name>
  <bridge name="virbr0" />
  <forward/>
  <ip address="192.168.122.1" netmask="255.255.255.0">
    <dhcp>
      <range start="192.168.122.2" end="192.168.122.254" />
    </dhcp>
  </ip>
</network>

But the default network connection is always in Inactive state. When I try to active it using the "Play" button at the bottom left of the dialog, I get the following error message:

Error starting network: internal error 'brctl setfd virbr%d 0' exited with non-zero status 1 and signal 0: set forward delay failed: No such device

Details:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/host.py", line 262, in start_network
    net.start()
  File "/usr/share/virt-manager/virtManager/network.py", line 71, in start
    self.net.create()
  File "/usr/lib/python2.6/dist-packages/libvirt.py", line 612, in create
    if ret == -1: raise libvirtError ('virNetworkCreate() failed', net=self)
libvirtError: internal error 'brctl setfd virbr%d 0' exited with non-zero status 1 and signal 0: set forward delay failed: No such device

Rick Clark (dendrobates)
Changed in libvirt (Ubuntu):
assignee: nobody → soren
Revision history for this message
Anders Kaseorg (andersk) wrote :

> <bridge name="virbr0" />
> 'brctl setfd virbr%d 0' exited with non-zero status 1

It sounds like you didn’t restart libvirt after making the config change, because it is still trying to bring up a bridge named “virbr%d”. Maybe try `/etc/init.d/libvirt-bin restart`, or reboot.

Revision history for this message
Esa Häkkinen (esa+hakkinen) wrote :

If /etc/libvirt/network/default.xml exists, in update progress, this file doesn't get patched via normal dpkg post-inst scripts.

> <bridge name='virbr%d 0' />

Manually all I had to do to fix it:
> /etc/init.f/stop
> ifconfig vnet0 down
> brctl delif virbr0
> /etc/init.d/libvirt-bin start

results in changed /etc/libvirt/network/default.xml line as following:
> <bridge name='virbr0' />

Assuming bug relies in dpkg post-inst script that doesn't handle existing default.xml configured e.g. Hardy libvirt-bin install process...

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Soren submitted this patch, which I have tested and verified that it solves the problem.

:-Dustin

Changed in libvirt (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Soren submitted this patch, which I have tested and verified that it solves the problem.

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Marking invalid against virt-manager. Virt-manager is definitely affected, but the bug is actually in libvirt.

:-Dustin

Changed in virt-manager (Ubuntu):
status: New → Invalid
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I'm uploading the fixed package now. We'll see if it makes it ...

:-Dustin

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 0.6.1-0ubuntu5

---------------
libvirt (0.6.1-0ubuntu5) jaunty; urgency=low

  * Fix logic error when applying %d bridge name rewriting. (LP: #350780)

 -- Soren Hansen <email address hidden> Thu, 16 Apr 2009 20:48:49 +0200

Changed in libvirt (Ubuntu Jaunty):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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