From: Marc Fiuczynski Date: Wed, 13 Feb 2008 10:11:44 +0000 (+0000) Subject: Run a config with two Qemu emulated nodes X-Git-Tag: tests-4.2-4~249 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d56cf37776972cdeeacb1ba9ddc040c46381e40e;p=tests.git Run a config with two Qemu emulated nodes --- diff --git a/system/config_onelab.py b/system/config_onelab.py index 6ad30d2..420817b 100644 --- a/system/config_onelab.py +++ b/system/config_onelab.py @@ -25,6 +25,22 @@ def nodes(): 'mac' : '00:0b:cd:62:50:95', }, }, + {'node_fields': {'hostname': 'pluton.inria.fr', + 'model':'qemu/minhw', } , + 'host_box': 'test.one-lab.org', + 'owner' : 'pi', + 'network_fields': { 'method':'static', + 'type':'ipv4', + 'ip':'138.96.250.151', + 'gateway':'138.96.248.250', + 'network':'138.96.0.0', + 'broadcast':'138.96.255.255', + 'netmask':'255.255.0.0', + 'dns1': '138.96.0.10', + 'dns2': '138.96.0.11', + 'mac' : '00:08:02:33:4d:9e', + }, + }, ] return nodes diff --git a/system/template-Qemu/env-qemu b/system/template-Qemu/env-qemu index 4659eb2..6dde002 100755 --- a/system/template-Qemu/env-qemu +++ b/system/template-Qemu/env-qemu @@ -19,7 +19,12 @@ INTERFACE_BRIDGE=br0 # Fonction de mise en place du pont start () { - + #if we have already configured the same host_box no need to do it again + set $(/sbin/ifconfig | grep $INTERFACE_BRIDGE) >/dev/null + if [ -n "$1" ]; then + echo "Interface bridge $INTERFACE_BRIDGE already exist." + exit 0 + fi if [ -n "$1" ]; then INTERFACE_LAN=$1 shift @@ -35,6 +40,8 @@ start () { #Restarting the udev echo "Starting the udev ..." /sbin/udevd restart + echo "Starting the kqemu patch module ..." + modprobe kqemu #Loding the tun/tap model echo "Loading the kqemu patch module ..." modprobe kqemu diff --git a/system/template-Qemu/start-qemu-node b/system/template-Qemu/start-qemu-node index 1db1117..92ae5aa 100755 --- a/system/template-Qemu/start-qemu-node +++ b/system/template-Qemu/start-qemu-node @@ -37,7 +37,7 @@ shift $(($# - 1)) echo "New $HDA is created..." #Command for running the Qemu Emulator -ARGS="-boot d -cdrom ${CDROM_IMG} -hda ${HDA} -m ${RAM} -net nic,macaddr=${MACADDR} -net $TAP -no-kqemu"; +ARGS="-boot d -cdrom ${CDROM_IMG} -hda ${HDA} -m ${RAM} -net nic,macaddr=${MACADDR} -net $TAP "; echo "Executing qemu $ARGS"; qemu $ARGS