Split network options

This commit is contained in:
Héctor Molinero Fernández 2021-11-11 23:15:37 +01:00
parent 1e9eb26b35
commit 9a75519e1d
2 changed files with 5 additions and 5 deletions

View File

@ -102,7 +102,9 @@ RUN export DEBIAN_FRONTEND=noninteractive \
ENV VM_CPU=2
ENV VM_RAM=1024M
ENV VM_KEYBOARD=en-us
ENV VM_NET_OPTIONS=
ENV VM_NET_GUESTFWD_OPTIONS=guestfwd=tcp:10.0.2.254:445-cmd:"nc 127.0.0.1 445"
ENV VM_NET_HOSTFWD_OPTIONS=hostfwd=tcp::2323-:23,hostfwd=tcp::5151-:51,hostfwd=tcp::3389-:3389
ENV VM_NET_EXTRA_OPTIONS=
ENV VM_KVM=true
ENV SVDIR=/etc/service/


View File

@ -5,11 +5,9 @@ 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 -- "$@" -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 -- "$@" -netdev user,id=n0,guestfwd=tcp:10.0.2.254:445-cmd:'nc 127.0.0.1 445',hostfwd=tcp::5151-:51,"${VM_NET_OPTIONS?}"
set -- "$@" -device e1000,netdev=n0
set -- "$@" -usb -device usb-tablet
set -- "$@" -k "${VM_KEYBOARD:?}"
set -- "$@" -usb -device usb-tablet -k "${VM_KEYBOARD:?}"

if [ "${VM_KVM:?}" = true ] && [ -c /dev/kvm ]; then
set -- "$@" -accel kvm