summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2015-11-04 11:48:50 +0000
committerNeil Williams <codehelp@debian.org>2015-11-04 11:48:50 +0000
commit3855370a24530cd0541519b906045c7ccb66c28e (patch)
tree382fc115e1c4e67a168fef2493dabf0e6e0bd1d1 /bin
parent5dea8d05069f0518ddf974eef79dc576c0b4bc1e (diff)
downloadvmdebootstrap-3855370a24530cd0541519b906045c7ccb66c28e.tar.gz
Add qemu-wrapper and an example lava-submit script.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/qemu-wrapper.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/qemu-wrapper.sh b/bin/qemu-wrapper.sh
new file mode 100755
index 0000000..2e6eab4
--- /dev/null
+++ b/bin/qemu-wrapper.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -e
+
+if [ -z "$1" ]; then
+ echo "Usage: <imagefile> <arch>"
+ echo "For x86_64, amd64 is also supported."
+ exit 1
+fi
+
+if [ -n "$2" ]; then
+ if [ "$2" = 'amd64' ]; then
+ ARCH='x86_64'
+ else
+ ARCH="$2"
+ fi
+else
+ echo "Specify the architecture of the image"
+ echo "Usage: <imagefile> <arch>"
+ echo "For x86_64, amd64 is also supported."
+ exit 1
+fi
+
+qemu-system-${ARCH} -m 1024 -enable-kvm -drive format=raw,file=./$1