Skip to content

Commit

Permalink
virtme_ng: run.py: Fix --qemu-opts option
Browse files Browse the repository at this point in the history
The current virtme-run --qemu-opts work, but the vng counterpart doesn't. This
is because we don't specify the number of arguments it can receive, so it fails with:

./vng -r --memory 4G --qemu-opts -device virtio-net-pci,netdev=dev1,mac=9a:e8:e9:ea:eb:ec,id=net1,vectors=9,mq=on -netdev tap,id=dev1,vhost=on,script=/etc/qemu-ifup-switch,queues=4
...
vng: error: argument --qemu-opts/-o: expected one argument

The fix is to apply the same nargs value from virtme-ng.

Signed-off-by: Marcos Paulo de Souza <[email protected]>
  • Loading branch information
marcosps committed Feb 11, 2025
1 parent 8cb14a8 commit 955f3ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion virtme_ng/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ def make_parser():
parser.add_argument(
"--qemu-opts",
"-o",
action="append",
nargs=argparse.REMAINDER,
metavar="OPTS...",
help="Additional arguments for QEMU (can be used multiple times)"
" or bundled together: --qemu-opts='...'",
)
Expand Down

0 comments on commit 955f3ce

Please sign in to comment.