3 # cd in this command's directory
9 qemu-img create -f qcow2 $HDA 10G
12 TAP="tap,script=$SCRIPT"
14 ########## from the test environment
15 # expected vars are MACADDR, NODE_ISO, HOSTNAME and TARGET_ARCH
17 if [ ! -e ${CONFIG} ];then
18 echo "File for node_iso version not found"
23 # the launcher, depending on local/target archs
24 archs="$(uname -i)+$TARGET_ARCH"
26 i386+i386) QEMU=qemu;;
27 i386+x86_64) QEMU=qemu-system-x86_64;;
28 x86_64+i386) QEMU=qemu;;
29 x86_64+x86_64) QEMU=qemu-system-x86_64;;
32 #Creating new HDA if needed only
33 #using qcow2 disk image format which is essential to support VM snapshots
37 echo "Creating hard disk (10G) for Qemu install under $HDA"
38 img=$($QEMU_CREATE_IMAGE)
40 echo "Can't Create disk image..."
43 echo "New image $HDA created"
48 #Command for running the Qemu Emulator
49 ARGS="-boot d -net nic,macaddr=${MACADDR} -net $TAP, -cdrom ${NODE_ISO} -hda ${HDA} -m ${RAM} -nographic -pidfile qemu.pid"
50 echo "Running $QEMU $ARGS < /dev/null"
51 exec $QEMU $ARGS < /dev/null