I have a problem with networking in qemu. I want to use the Linux tap
device for qemu network. For that

*1. I created a bridge -*

$ sudo brctl addbr br0

*2. I used the following qemu-ifup script*

#!/bin/sh
set -x

switch=br0

if [ -n "$1" ];then
        /usr/bin/sudo /usr/sbin/tunctl -u `whoami` -t $1
        /usr/bin/sudo /sbin/ip link set $1 up
        sleep 0.5s
        /usr/bin/sudo /usr/sbin/brctl addif $switch $1
        exit 0
else
        echo "Error: no interface specified"
        exit 1
fi

*3. When I run qemu using*

$ qemu-system-i386 -m 200M -cdrom images/ss.iso -serial stdio -device
e1000,netdev=net0,mac=DE:AD:BE:EF:00:C0 -netdev
tap,id=net0,script=/home/user/qemu-ifup

*/home/user/qemu-ifup:could not launch network script*

*qemu-system-i386: -netdev tap,id=net0,script=/home/user/qemu-ifup:
Device 'tap' could not be initialized*


How do I resolve this problem?

Thank you

gayathri

Reply via email to