docker-qemu-reactos/scripts/service/qemu/run
Héctor Molinero Fernández 88a1b868a8 Shutdown services gracefully
2021-11-02 19:23:18 +01:00

25 lines
739 B
Bash
Executable File

#!/bin/sh
set -eu
set --
set -- "$@" -smp "${VM_CPU:?}" -m "${VM_RAM:?}"
set -- "$@" -serial stdio -monitor unix:/run/qemu-monitor,server,nowait -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 "$@"