[Bug 475327] [NEW] qemu -net nic -net tap does not start due to qemu-ifXXX scripts

dl9sau thomas at x-berg.in-berlin.de
Thu Nov 5 12:34:18 UTC 2009


Public bug reported:

Binary package hint: qemu

qemu in ubuntu karmic brings new /etc/qemu-{ifup,ifdown} scripts which
do not work well.

Btw, these scripts are symlinks to /usr/bin. Imho it's not a good idea
to have environment dependend scripts in a bin or sbin path.

My qemu -net nic -net tap terminates in an early startup stage:
can't add tap0 to bridge eth1: Operation not supported
/etc/qemu-ifup: could not launch network script
qemu: Could not initialize device 'tap'

qemu-ifstart does:
cat /usr/bin/qemu-ifup
#!/bin/sh

switch=$(/sbin/ip route list | awk '/^default / { print $5 }')
/sbin/ifconfig $1 0.0.0.0 up
/usr/sbin/brctl addif ${switch} $1

There's really no need to reconfigure my network interfaces. Not only
that users often like to have their virtual machine(s) to be routet or
NAT'ed behind their real machine. Your startup will not work, like at my
notebook, properly if that network interface is a wireless device.
Wireless devices are normaly in WLAN client mode, and this does not work
-by design- as a bridge.

Ugly fix:
edit /usr/bin/qemu-if* and insert "exit 0" after the first empty line.
Because new qemu versions do bring their new /usr/bin/qemu-if*, you need to put qemu on hold, or chattr +i /usr/bin/qemu-if*.
The correct way would be to ask the user during installation if he likes every qemu process to join a bridge with the NICs the default route, and only then install that qemu-if*. I'd like to see this to be really in /etc and not in /usr/sbin, and not to be touched again by a regular package update.

** Affects: qemu (Ubuntu)
     Importance: Undecided
         Status: New

-- 
qemu -net nic -net tap does not start due to qemu-ifXXX scripts
https://bugs.launchpad.net/bugs/475327
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

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




More information about the universe-bugs mailing list