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") # ---------------------------------------------------------------------------------------