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 node_iso version not found"
15 #always use the 64 bit version of qemu, as this will work on both 32 & 64 bit host kernels
21 TAP="tap,script=$SCRIPT"
23 #Creating new HDA if needed only
24 #using qcow2 disk image format which is essential to support VM snapshots
28 echo "Creating hard disk for Qemu install under $HDA"
29 img=$(qemu-img create -f qcow2 $HDA 5G)
31 echo "Can't Create disk image..."
36 echo "New $HDA is created..."
40 #Command for running the Qemu Emulator
41 ARGS="-boot d -net nic,macaddr=${MACADDR} -net $TAP, -cdrom ${NODE_ISO} -hda ${HDA} -m ${RAM} -nographic -pidfile qemu.pid"
43 echo "Running $QEMU $ARGS < /dev/null"
44 exec $QEMU $ARGS < /dev/null