docker-qemu-reactos/scripts/service/qemu/run
2021-10-31 13:07:59 +01:00

25 lines
693 B
Bash
Executable File

#!/bin/sh
set -eu
set --
set -- "$@" -smp "${VM_CPU:?}" -m "${VM_RAM:?}"
set -- "$@" -serial stdio -device VGA -display vnc=:0
set -- "$@" -drive file=/var/lib/qemu/images/reactos.img,index=0,media=disk,format=qcow2
set -- "$@" -drive file=/var/lib/qemu/iso/reactos.iso,index=2,media=cdrom,format=raw
set -- "$@" -boot order="${VM_BOOT_ORDER:?}",menu=off
set -- "$@" -netdev user,id=n0,"${VM_NET_OPTIONS:?}"
set -- "$@" -device e1000,netdev=n0
set -- "$@" -usb -device usb-tablet
set -- "$@" -k "${VM_KEYBOARD:?}"
if [ "${VM_KVM:?}" = true ] && [ -c /dev/kvm ]; then
set -- "$@" -accel kvm
else
set -- "$@" -accel tcg
fi
cd /var/lib/qemu/
exec 2>&1
exec /usr/bin/qemu-system-x86_64 "$@"