3 # cd in this command's directory
6 #Getting the env. as passed by the test framework - mostly MACADDR and NODE_ISO
8 if [ ! -e ${CONFIG} ];then
9 echo "File for MAC Address not found"
15 QEMU=qemu-system-x86_64
20 TAP="tap,script=$SCRIPT";
23 ##check for the creation of new HDA
24 #if [ -e "$HDA" ]; then
25 # echo "Disk already existing removing it..."
30 #Creating new HDA if needed only
34 echo "Creating hard disk for Qemu install under $HDA"
35 img=$(qemu-img create $HDA 10G)
37 echo "Can't Create disk image..."
42 echo "New $HDA is created..."
46 #Command for running the Qemu Emulator
47 ARGS="-boot d -cdrom ${NODE_ISO} -hda ${HDA} -m ${RAM} -net nic,macaddr=${MACADDR} -net $TAP -nographic -pidfile qemu.pid"
49 echo "Running $QEMU $ARGS < /dev/null"
50 exec $QEMU $ARGS < /dev/null