diff --git a/Dockerfile.m4 b/Dockerfile.m4 index 3bb9ad9..a368cad 100644 --- a/Dockerfile.m4 +++ b/Dockerfile.m4 @@ -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/ diff --git a/scripts/service/qemu/run b/scripts/service/qemu/run index e0ff811..43ef628 100755 --- a/scripts/service/qemu/run +++ b/scripts/service/qemu/run @@ -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