mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-09 05:16:47 +00:00
Rename RAND_PORT_NUM
This commit is contained in:
parent
778779fa0d
commit
3240965f0a
@ -7,11 +7,11 @@
|
|||||||
# A switch "-ovmf" can be passed as an argument to enable OVMF.
|
# A switch "-ovmf" can be passed as an argument to enable OVMF.
|
||||||
# The enrivonmental variable VSOCK can be passed as 1 to trigger vsock module.
|
# The enrivonmental variable VSOCK can be passed as 1 to trigger vsock module.
|
||||||
|
|
||||||
RAND_PORT_NUM1=$(shuf -i 1024-65535 -n 1)
|
SSH_RAND_PORT=$(shuf -i 1024-65535 -n 1)
|
||||||
RAND_PORT_NUM2=$(shuf -i 1024-65535 -n 1)
|
NGINX_RAND_PORT=$(shuf -i 1024-65535 -n 1)
|
||||||
RAND_PORT_NUM3=$(shuf -i 1024-65535 -n 1)
|
REDIS_RAND_PORT=$(shuf -i 1024-65535 -n 1)
|
||||||
|
|
||||||
echo "[$1] Forwarded QEMU guest port: $RAND_PORT_NUM1->22; $RAND_PORT_NUM2->8080 $RAND_PORT_NUM3->6379" 1>&2
|
echo "[$1] Forwarded QEMU guest port: $SSH_RAND_PORT->22; $NGINX_RAND_PORT->8080 $REDIS_RAND_PORT->6379" 1>&2
|
||||||
|
|
||||||
COMMON_QEMU_ARGS="\
|
COMMON_QEMU_ARGS="\
|
||||||
-cpu Icelake-Server,+x2apic \
|
-cpu Icelake-Server,+x2apic \
|
||||||
@ -23,7 +23,7 @@ COMMON_QEMU_ARGS="\
|
|||||||
-serial chardev:mux \
|
-serial chardev:mux \
|
||||||
-monitor chardev:mux \
|
-monitor chardev:mux \
|
||||||
-chardev stdio,id=mux,mux=on,signal=off,logfile=qemu.log \
|
-chardev stdio,id=mux,mux=on,signal=off,logfile=qemu.log \
|
||||||
-netdev user,id=net01,hostfwd=tcp::$RAND_PORT_NUM1-:22,hostfwd=tcp::$RAND_PORT_NUM2-:8080,hostfwd=tcp::$RAND_PORT_NUM3-:6379 \
|
-netdev user,id=net01,hostfwd=tcp::$SSH_RAND_PORT-:22,hostfwd=tcp::$NGINX_RAND_PORT-:8080,hostfwd=tcp::$REDIS_RAND_PORT-:6379 \
|
||||||
-object filter-dump,id=filter0,netdev=net01,file=virtio-net.pcap \
|
-object filter-dump,id=filter0,netdev=net01,file=virtio-net.pcap \
|
||||||
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \
|
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \
|
||||||
-drive if=none,format=raw,id=x0,file=./test/build/ext2.img \
|
-drive if=none,format=raw,id=x0,file=./test/build/ext2.img \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user