Run a config with two Qemu emulated nodes
authorMarc Fiuczynski <mef@cs.princeton.edu>
Wed, 13 Feb 2008 10:11:44 +0000 (10:11 +0000)
committerMarc Fiuczynski <mef@cs.princeton.edu>
Wed, 13 Feb 2008 10:11:44 +0000 (10:11 +0000)
system/config_onelab.py
system/template-Qemu/env-qemu
system/template-Qemu/start-qemu-node

index 6ad30d2..420817b 100644 (file)
@@ -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
 
index 4659eb2..6dde002 100755 (executable)
@@ -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
index 1db1117..92ae5aa 100755 (executable)
@@ -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