From dcf19853def2fbb51320401e5fefc2f7593b938c Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sat, 6 May 2023 12:19:15 +0530 Subject: livevm: add support for usb passthrough --- .local/bin/livevm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.local/bin') diff --git a/.local/bin/livevm b/.local/bin/livevm index c1b599e..26e3160 100755 --- a/.local/bin/livevm +++ b/.local/bin/livevm @@ -18,7 +18,7 @@ then shift fi -while getopts "wehc:d:q:r:" f +while getopts "wehc:d:u:q:r:" f do case "$f" in w) @@ -40,6 +40,9 @@ do d) cmd="${cmd} -drive file=${OPTARG}" ;; + u) + cmd="${cmd} -device qemu-xhci,id=xhci -device usb-host,hostdevice=/dev/bus/usb/${OPTARG}" + ;; q) cmd="${cmd} -drive file=${OPTARG}" ;; @@ -55,6 +58,7 @@ do -w run wangblows -c [cdrom] -d [drive] + -u [host_bus/host_addr] -q [img.qcow2] -r [img.raw] EOF -- cgit v1.2.3