From 37473b3aef7f16d9d88be311219fd5a41b6f2fb8 Mon Sep 17 00:00:00 2001 From: no92 Date: Sun, 1 Sep 2024 23:31:42 +0200 Subject: [PATCH] scripts: add --qmp flag to vm-utils.py --- scripts/vm-util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/vm-util.py b/scripts/vm-util.py index c11083fb9..c4f828eb7 100755 --- a/scripts/vm-util.py +++ b/scripts/vm-util.py @@ -316,6 +316,9 @@ def do_qemu(args): qemu_args += ["-chardev", f"socket,id=usb-redir-chardev{num},port={port},host={host}"] qemu_args += ["-device", f"usb-redir,chardev=usb-redir-chardev{num},id=usb-redir{num},bus=xhci.0"] + if args.qmp: + qemu_args += ["-qmp", "tcp:0.0.0.0:4444,server"] + # TODO: Support virtio-console via: # -chardev file,id=virtio-trace,path=virtio-trace.bin # -device virtio-serial -device virtconsole,chardev=virtio-trace @@ -354,6 +357,7 @@ def do_qemu(args): qemu_parser.add_argument("--usb-passthrough-pcap", type=str, action='append') qemu_parser.add_argument("--usb-redir", type=str, action='append') qemu_parser.add_argument("--cmd", type=str) +qemu_parser.add_argument("--qmp", action="store_true") qemu_parser.add_argument("--use-system-qemu", action="store_true") # ---------------------------------------------------------------------------------------