[tools] Add remote option to qemu.sh

I discovered that QEMU has a "remote" option to the `-vnc` switch, which
causes it to reverse-connect to a VNC client on start. I've added this
into qemu.sh as the -r option.
This commit is contained in:
Justin C. Miller
2023-01-08 00:17:13 -08:00
parent 28cd3bb625
commit 7150e11ed0

View File

@@ -33,6 +33,13 @@ while true; do
vga="" vga=""
shift shift
;; ;;
-r | --remote)
shift
vnchost="${1:-${VNCHOST:-localhost}}"
gfx="-vnc ${vnchost}:7000,reverse"
vga=""
shift
;;
-k | --kvm) -k | --kvm)
kvm="-enable-kvm" kvm="-enable-kvm"
cpu="host" cpu="host"
@@ -92,6 +99,7 @@ qemu-system-x86_64 \
-cpu "${cpu}" \ -cpu "${cpu}" \
-M q35 \ -M q35 \
-no-reboot \ -no-reboot \
-name "jsix" \
$isaexit $log $gfx $vga $kvm $debug $isaexit $log $gfx $vga $kvm $debug
((result = ($? >> 1) - 1)) ((result = ($? >> 1) - 1))