From mboxrd@z Thu Jan 1 00:00:00 1970 From: c.monty@web.de Subject: Setting up network for KVM guests Date: Thu, 26 May 2011 23:40:26 +0200 (CEST) Message-ID: <374843856.1181206.1306446026196.JavaMail.fmail@mwmweb002> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE To: kvm@vger.kernel.org Return-path: Received: from fmmailgate05.web.de ([217.72.192.243]:58442 "EHLO fmmailgate05.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755301Ab1EZVk1 convert rfc822-to-8bit (ORCPT ); Thu, 26 May 2011 17:40:27 -0400 Received: from mwmweb002 ( [172.20.18.11]) by fmmailgate05.web.de (Postfix) with ESMTP id 31C156536FF1 for ; Thu, 26 May 2011 23:40:26 +0200 (CEST) Sender: kvm-owner@vger.kernel.org List-ID: Hello! I have installed KVM/QEMU on my LMDE (Linux Mint Debian Edition) system= =2E On this webpage I found some instructions howto setup the network: http://www.linux-kvm.org/page/Networking My first question is: =46or a public bridge, should I configure /etc/network/interfaces in or= der to create the bridge static. Or should I use a script to create a bridge dynamically when the virtua= l machine starts. Second question: I made some tests with this script that is shown in section public bridge -> Solution 2: manual: #!/bin/sh set -x switch=3Dbr0 if [ -n "$1" ];then =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /usr/bin/sudo /usr/sbin/tunc= tl -u `whoami` -t $1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /usr/bin/sudo /sbin/ip link = set $1 up =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sleep 0.5s =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /usr/bin/sudo /usr/sbin/brct= l addif $switch $1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 exit 0 else =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 echo "Error: no interface sp= ecified" =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 exit 1 fi When I debug this script I can see that it always ends up in "Error: no= interface specified": bash -x /usr/local/bin/networkbridge_setup.sh + set -x + switch=3Dbr0 + '[' -n '' ']' + echo 'Error: no interface specified' Error: no interface specified + exit 1 Why is that? THX