From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fq2v9-0008Vb-86 for qemu-devel@nongnu.org; Tue, 13 Jun 2006 03:02:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fq2v8-0008VH-Ek for qemu-devel@nongnu.org; Tue, 13 Jun 2006 03:02:38 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fq2v8-0008VE-71 for qemu-devel@nongnu.org; Tue, 13 Jun 2006 03:02:38 -0400 Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fq341-0000Ly-6Z for qemu-devel@nongnu.org; Tue, 13 Jun 2006 03:11:49 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Fq2uz-0007Sp-MA for qemu-devel@nongnu.org; Tue, 13 Jun 2006 09:02:29 +0200 Received: from p5084b798.dip0.t-ipconnect.de ([80.132.183.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Jun 2006 09:02:29 +0200 Received: from peter_remove_this_ by p5084b798.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Jun 2006 09:02:29 +0200 From: Peter =?ISO-8859-15?Q?Sch=FCtt?= Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8Bit Sender: news Subject: [Qemu-devel] Problems with network handling (Bridge, Qemu) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Tue, 13 Jun 2006 07:02:39 -0000 To: qemu-devel@nongnu.org Hallo, I, Debian Testing/Unstable, 2.6.15, KDE 3.5.3, try to connect my virtual Qemu-machines totally to my network. For this I uses scripts which I found at different places. The start script for the virtual machine: #!/bin/sh sudo /opt/qemu/init-kqemu.sh sudo /opt/qemu/qemu-start-net.sh qemu -net nic,vlan=0 -net tap,vlan=0,ifname=tap0  -usb -soundhw   \     sb16 -localtime  win98dev.img  $1 $2 $3 $4 $5 $6 $7 $8 $9 The subscripts: #!/bin/sh #prepare kqemu if [ `lsmod | grep -c kqemu` -eq 0  ]; then   echo "load kqemu...";   /sbin/modprobe kqemu major=0;   sleep 3; fi /bin/chown root.winuser /dev/kqemu; /bin/chmod 0660 /dev/kqemu #!/bin/sh if [ `netstat -i | grep -c br0` -eq 0 ]; then   /bin/chgrp winuser /dev/net/tun   /bin/chmod 0664 /dev/net/tun   # Allow IP forwarding   /bin/echo 1 > /proc/sys/net/ipv4/ip_forward   echo "Setup the bridge";   brctl addbr br0   echo "Add host ethernet adapter to the bridge"   brctl addif br0 eth0   echo "Remove IP address from host ethernet device"   ifconfig eth0 0.0.0.0 up   echo "Grab an IP address from DHCP for the bridge"   /sbin/dhclient br0; fi; The following script will be called by qemu: #!/bin/sh echo  $1 /sbin/ifconfig $1 0.0.0.0 promisc up /usr/sbin/brctl addif br0 $1 The output of the start script: [..] DHCPREQUEST on br0 to 255.255.255.255 port 67 DHCPACK from 192.168.10.1 bound to 192.168.10.22 [..] It shows that the bridge is connected to the router. After this neither my host linux machine nor the virtual machine is connected to the internet. Also my router was not reachable. I could solve this only by a restart. Something I tried to reach the internet again without a restart: ifconfig br0 down brctl delif br0 eth0 brctl delbr br0 ifconfig eth0 up /sbin/dhclient eth0 but it does not work. I am very appreciate for any hints to solve my problems, also for hints to reconnect to the internet after failure tries. Ciao   Peter Schütt -- www.pstt.de