#!/bin/sh set -eu set -- set -- "$@" -machine pc -smp "${VM_CPU:?}" -m "${VM_RAM:?}" set -- "$@" -serial stdio -monitor unix:/run/qemu-monitor,server,nowait -device VGA -display vnc=:0 set -- "$@" -device e1000,netdev=n0 -netdev user,id=n0,"${VM_NET_GUESTFWD_OPTIONS?}","${VM_NET_HOSTFWD_OPTIONS?}","${VM_NET_EXTRA_OPTIONS?}" set -- "$@" -drive file=/var/lib/qemu/image/reactos.qcow2,index=0,media=disk,format=qcow2 set -- "$@" -usb -device usb-tablet -k "${VM_KEYBOARD:?}" if [ "${VM_KVM:?}" = true ] && [ -c /dev/kvm ]; then set -- "$@" -accel kvm else set -- "$@" -accel tcg fi iso_i=2 for iso in /var/lib/qemu/iso/*; do [ -f "${iso:?}" ] || continue set -- "$@" -drive file="${iso:?}",index="${iso_i:?}",media=cdrom,format=raw iso_i="$((iso_i + 1))" done if [ "${iso_i:?}" -gt 2 ]; then set -- "$@" -boot order=dc,menu=on,splash-time=5000 fi cd /var/lib/qemu/ exec 2>&1 exec /usr/bin/qemu-system-x86_64 "$@"