diff --git a/Dockerfile.m4 b/Dockerfile.m4 index 300c7d4..2aba29a 100644 --- a/Dockerfile.m4 +++ b/Dockerfile.m4 @@ -115,7 +115,7 @@ COPY --from=build --chown=root:root /tmp/novnc/ /opt/novnc/ COPY --from=build --chown=root:root /tmp/websockify/ /opt/novnc/utils/websockify/ # Copy ReactOS disk -COPY --from=build --chown=root:root /tmp/reactos.qcow2 /var/lib/qemu/reactos.qcow2 +COPY --from=build --chown=root:root /tmp/reactos.qcow2 /var/lib/qemu/image/reactos.qcow2 # Copy Samba config COPY --chown=root:root ./config/samba/ /etc/samba/ diff --git a/scripts/service/qemu/run b/scripts/service/qemu/run index 43ef628..a867f13 100755 --- a/scripts/service/qemu/run +++ b/scripts/service/qemu/run @@ -6,7 +6,7 @@ set -- set -- "$@" -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/reactos.qcow2,index=0,media=disk,format=qcow2 +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 @@ -15,6 +15,17 @@ 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 "$@"