This is not how tap networking works. You have to either pre-configure the tap device before starting qemu, or grant the user ability to create tap devices. Qemu have to open (or create) the tap device BEFORE invoking the script, and if fails to do so due to insufficient privileges, hence the script does not run. This is not a bug.
** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/770173 Title: /etc/qemu-ifup is not executed Status in QEMU: Invalid Bug description: The following does not work: $ qemu -m 512 -drive file=arch_min.qcow2,if=virtio,boot=on -nographic -net nic,model=virtio -net tap,script=/etc/qemu-ifup warning: could not configure /dev/net/tun: no virtual network emulation However, this works: $ /etc/qemu-ifup tap0 $ kvm -m 512 -drive file=arch_min.qcow2,if=virtio,boot=on -nographic -net nic,model=virtio -net tap,ifname=tap0,script=no,downscript=no $ /etc/qemu-ifdown tap0 Other info: - qemu 0.12.5 - ubuntu 10.10 $ ls -l /etc/qemu-ifup lrwxrwxrwx 1 root root 18 2011-03-26 15:57 /etc/qemu-ifup -> /usr/bin/qemu-ifup* $ cat /etc/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 set -x switch=br0 if [ -n "$1" ];then /usr/bin/sudo /etc/qemu-ifup-sudo $1 `whoami` exit 0 else echo "Error: no interface specified" exit 1 fi $ cat /etc/qemu-ifup-sudo #!/bin/sh set -x switch=br0 /usr/sbin/tunctl -u $2 -t $1 /usr/bin/sudo /sbin/ip link set $1 up sleep 0.5s /usr/bin/sudo /usr/sbin/brctl addif $switch $1