Setting up network for KVM guests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux