mirror of
https://github.com/hectorm/docker-qemu-reactos
synced 2025-09-01 22:10:25 +00:00
Added support for mounting ISOs
This commit is contained in:
@ -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 "$@"
|
||||
|
Reference in New Issue
Block a user