script to configure the tun/tap network device used by qemu
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 18 Jan 2008 16:16:52 +0000 (16:16 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 18 Jan 2008 16:16:52 +0000 (16:16 +0000)
system/qemu-ifup [new file with mode: 0755]

diff --git a/system/qemu-ifup b/system/qemu-ifup
new file mode 100755 (executable)
index 0000000..b14f2f3
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Mise en place d'un environnement d'exécution d'une machine
+# virtuelle sous QEMU pour partage de la connexion réseau
+# avec une une machine hôte sous FC6.
+
+INTERFACE_LAN=eth0
+INTERFACE_BRIDGE=br0
+
+echo "Configure $1 interface..."
+echo "Activating link for $1..."
+/sbin/ip link set $1 up
+sleep 1
+echo "Configure $INTERFACE_BRIDGE bridge..."
+/usr/sbin/brctl addif $INTERFACE_BRIDGE $1
+echo "Activating promiscuous mode on $1 ..."
+/sbin/ifconfig $1 0.0.0.0 promisc up
+sleep 1
+echo "Done."