diff options
author | sinanmohd <sinan@firemail.cc> | 2023-05-06 12:19:15 +0530 |
---|---|---|
committer | sinanmohd <sinan@firemail.cc> | 2023-05-06 12:19:15 +0530 |
commit | dcf19853def2fbb51320401e5fefc2f7593b938c (patch) | |
tree | 7fcad350f3ffb2e2b7adab670afec3a86cc33a6e | |
parent | 62286efb0c62102ed1731e52dc9495bb80d41a10 (diff) |
livevm: add support for usb passthrough
-rwxr-xr-x | .local/bin/livevm | 6 |
1 files changed, 5 insertions, 1 deletions
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 |