KVM - The Linux Kernel-Based Virtual Machine
News, Blogs and Resources on the Linux (KVM) Kernel-Based Virtual Machine

public bridge don't work

1 reply [Last post]
vehn
User offline. Last seen 1 year 5 weeks ago. Offline
Joined: Sep 9 2008
Points: 0

My computer is router to internet for my home wireless net. I want connect my guest to my homenet.

ppp0 -- Internet

ath0 -- 192.168.0.1 homenet router (I attempt connect to 192.168.0.0/24)

murat[.kvm]$ cat qemu-ifup
#!/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

sudo /usr/sbin/brctl addbr br0

sudo /usr/sbin/brctl addif br0 ath0                                                                                                                                                                                                           

sudo /usr/sbin/brctl showbridge name    bridge id        STP enabled    interfaces
br0        8000.00179a74282b    no        ath0

murat[.kvm]$ qemu-system-x86_64 windows.img -net nic,macaddr=DE:AD:BE:EF:36:18 -net tap,script=qemu-ifup
warning: could not configure /dev/net/tun: no virtual network emulation
Could not initialize device 'tap'

What's I am doing wrong? :/

Haydn Solomon
User offline. Last seen 18 hours 45 min ago. Offline
Joined: Mar 7 2008
Points: 204
What happens if you issue the

What happens if you issue the command 'tunctl' from the command line? Does it then create the tap device?

Post new comment

The content of this field is kept private and will not be shown publicly.