# the launcher, depending on target arch
# make sure to check qemu-kill-node for consistency
case $TARGET_ARCH in
- i386) QEMU=qemu;;
- x86_64) QEMU=qemu-system-x86_64;;
+ i386) QEMU=qemu ; ARGS="" ;;
+ x86_64) QEMU=qemu-system-x86_64 ; ARGS="-no-kqemu" ;;
*) echo "Cannot handle TARGET_ARCH=$TARGET_ARCH"; exit 1 ;;
esac
echo 'Cleaning up pid file'
rm -f qemu.pid
-#Command for running the Qemu Emulator
-# can't use -daemonize: qemu-ifup: could not launch network script
-ARGS=""
+
+
+# qemu options
# basics
ARGS="$ARGS -m ${RAM}"
ARGS="$ARGS -hda ${DISK_IMAGE}"
ARGS="$ARGS -nographic"
ARGS="$ARGS -pidfile qemu.pid"
+# how many pysical procs have we got, run in smp mode if possible
+procs=$(grep -i mhz /proc/cpuinfo | wc -l )
+if (( $procs >= 2 )) ; then ARGS="$ARGS -smp 2" ; fi
# boot from CD
ARGS="$ARGS -boot d"
ARGS="$ARGS -cdrom ${NODE_ISO}"