public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: c.monty@web.de
To: kvm@vger.kernel.org
Subject: Setting up network for KVM guests
Date: Thu, 26 May 2011 23:40:26 +0200 (CEST)	[thread overview]
Message-ID: <374843856.1181206.1306446026196.JavaMail.fmail@mwmweb002> (raw)

Hello!
I have installed KVM/QEMU on my LMDE (Linux Mint Debian Edition) system.

On this webpage I found some instructions howto setup the network:
http://www.linux-kvm.org/page/Networking

My first question is:
For a public bridge, should I configure /etc/network/interfaces in order to create the bridge static.
Or should I use a script to create a bridge dynamically when the virtual 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=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

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=br0
+ '[' -n '' ']'
+ echo 'Error: no interface specified'
Error: no interface specified
+ exit 1


Why is that?

THX

             reply	other threads:[~2011-05-26 21:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26 21:40 c.monty [this message]
2011-05-26 22:04 ` Setting up network for KVM guests David Mair

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=374843856.1181206.1306446026196.JavaMail.fmail@mwmweb002 \
    --to=c.monty@web.de \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox