docker-qemu-reactos/scripts/service/qemu/run

19 lines
833 B
Plaintext
Raw Normal View History

2019-02-20 22:10:38 +00:00
#!/bin/sh
set -eu
QEMU=$(command -v qemu-system-x86_64)
QEMU_ARGS="${QEMU_ARGS-} -smp ${QEMU_CPU:?} -m ${QEMU_RAM:?}"
2019-02-20 22:10:38 +00:00
QEMU_ARGS="${QEMU_ARGS-} -vga std -display vnc=:0"
QEMU_ARGS="${QEMU_ARGS-} -drive file=/var/lib/qemu/images/reactos.img,index=0,media=disk,format=${QEMU_DISK_FORMAT:?}"
2019-02-20 22:10:38 +00:00
QEMU_ARGS="${QEMU_ARGS-} -drive file=/var/lib/qemu/iso/reactos.iso,index=2,media=cdrom,format=raw"
QEMU_ARGS="${QEMU_ARGS-} -boot order=${QEMU_BOOT_ORDER:?},menu=${QEMU_BOOT_MENU:?},splash-time=5000"
QEMU_ARGS="${QEMU_ARGS-} -netdev user,id=n0,${QEMU_NET_OPTIONS:?} -device ${QEMU_NET_DEVICE:?},netdev=n0"
2019-02-20 22:10:38 +00:00
QEMU_ARGS="${QEMU_ARGS-} -usb -device usb-tablet"
QEMU_ARGS="${QEMU_ARGS-} -k ${QEMU_KEYBOARD:?}"
if [ "${QEMU_KVM:?}" = true ]; then QEMU_ARGS="${QEMU_ARGS-} -enable-kvm"; fi
2019-02-20 22:10:38 +00:00
2019-09-15 18:55:14 +00:00
cd /var/lib/qemu/
2019-02-20 22:10:38 +00:00
exec 2>&1
exec "${QEMU:?}" ${QEMU_ARGS:?}