git://git.onelab.eu
/
tests.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
another round of rework
[tests.git]
/
system
/
template-qemu
/
qemu-start-node
diff --git
a/system/template-qemu/start-qemu-node
b/system/template-qemu/qemu-start-node
similarity index 60%
rename from
system/template-qemu/start-qemu-node
rename to
system/template-qemu/qemu-start-node
index
b138531
..
8d8b079
100755
(executable)
--- a/
system/template-qemu/start-qemu-node
+++ b/
system/template-qemu/qemu-start-node
@@
-3,7
+3,8
@@
# cd in this command's directory
cd $(dirname $0)
# cd in this command's directory
cd $(dirname $0)
-#Getting the env. as passed by the test framework - mostly MACADDR and NODE_ISO
+#Getting the env. as passed by the test framework
+# expected vars are MACADDR, NODE_ISO, HOSTNAME and TARGET_ARCH
CONFIG=qemu.conf
if [ ! -e ${CONFIG} ];then
echo "File for node_iso version not found"
CONFIG=qemu.conf
if [ ! -e ${CONFIG} ];then
echo "File for node_iso version not found"
@@
-11,10
+12,17
@@
if [ ! -e ${CONFIG} ];then
fi
. $CONFIG
fi
. $CONFIG
-#default Value
-#always use the 64 bit version of qemu, as this will work on both 32 & 64 bit host kernels
+# the launcher, depending on local/target archs
+archs="$(uname-i)+$(TARGET_ARCH)"
+case $archs in
+ i386+i386) QEMU= qemu;;
+ i386+x86_64) QEMU= qemu-system-x86_64;;
+ x86_64+i386) QEMU= qemu;;
+ x86_64+x86_64) QEMU= qemu-system-x86_64;;
+esac
+
QEMU=qemu
QEMU=qemu
-HDA=h
da_5
.img
+HDA=h
ard_drive
.img
RAM=1024
SCRIPT=qemu-ifup
RAM=1024
SCRIPT=qemu-ifup
@@
-25,8
+33,8
@@
TAP="tap,script=$SCRIPT"
if [ -f $HDA ] ; then
echo "Using $HDA"
else
if [ -f $HDA ] ; then
echo "Using $HDA"
else
- echo "Creating hard disk for Qemu install under $HDA"
- img=$(qemu-img create -f qcow2 $HDA
5
G)
+ echo "Creating hard disk
(10G)
for Qemu install under $HDA"
+ img=$(qemu-img create -f qcow2 $HDA
10
G)
if [ -z "$img" ];then
echo "Can't Create disk image..."
exit 1
if [ -z "$img" ];then
echo "Can't Create disk image..."
exit 1