Add QEMU_BOOT parameter to tianon/qemu

This commit is contained in:
Tianon Gravi 2015-07-15 10:19:46 -07:00
parent 1d9253bcac
commit e1366bdec9
2 changed files with 6 additions and 0 deletions

View File

@ -11,4 +11,5 @@
-e QEMU_RAM=4096 \
-v /home/jsmith/downloads/debian.iso:/tmp/debian.iso:ro \
-e QEMU_CDROM=/tmp/debian.iso \
-e QEMU_BOOT='order=d' \
tianon/qemu

View File

@ -7,6 +7,7 @@ set -e
# QEMU_HDA (filename)
# QEMU_HDA_SIZE (bytes, suffixes like "G" allowed)
# QEMU_CDROM (filename)
# QEMU_BOOT (-boot)
hostArch="$(uname -m)"
qemuArch="${QEMU_ARCH:-$hostArch}"
@ -41,6 +42,10 @@ if [ "$QEMU_CDROM" ]; then
qemuArgs+=( -cdrom "$QEMU_CDROM" )
fi
if [ "$QEMU_BOOT" ]; then
qemuArgs+=( -boot "$QEMU_BOOT" )
fi
qemuArgs+=(
-net nic
-net user,hostname="$(hostname)",hostfwd=tcp:':22'-':22'