Presumably the occasional desktop user would use virt manager which will
by default attach a veth nic to virbr0?

The reason this bug was raised is that /etc/qemu-ifup assumes the
default route has been bridged.

For the moment, we always create a virbr0, so perhaps qemu-ifup should
attach tap0 to virbr0?  In fact it is quite easy to check whether the
nic on the default route is a bridge.  And/or perhaps the switch should
be configurable in /etc/default/qemu-kvm?

So /etc/default/qemu-kvm could contain:

# Uncomment this if you want to specify a bridge to use for tap devices
# TAPBR=virbr0

Then /etc/qemu-ifup could read:

#!/bin/sh

[ -f /etc/default/qemu-kvm ] && . /etc/default/qemu-kvm
if [ -z "$TAPBR" ]; then
        switch=$(ip route list | awk '/^default / { print $5 }')
        if [ -z "${TAPBR}" -o ! -d "/sys/class/net/${TAPBR}/bridge" ]; then
                switch=virbr0
        fi
fi
ifconfig $1 0.0.0.0 up
brctl addif ${switch} $1


** Changed in: qemu (Ubuntu)
   Importance: Undecided => Low

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/475327

Title:
  qemu -net nic -net tap does not start due to qemu-ifXXX scripts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/475327/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to