Try this one :

qemu-system-x86_64 -machine q35 -cpu max -accel nvmm -m 8G -vga std \
-drive file=/mnt/zroot-133/bhyve/img/Android/Android-qemu.img,format=raw \
-rtc base=localtime -device usb-ehci,id=usb,bus=pcie.0,addr=0x3 -device
usb-tablet -device usb-kbd \
-smbios type=2 -nodefaults -netdev
tap,id=mynet0,ifname=tap16,script=no,downscript=no \
-device e1000,netdev=mynet0,mac=52:55:00:d1:55:02 -device ich9-ahci,id=sata
\
-drive
if=pflash,format=raw,readonly=on,file=/usr/local/share/edk2-qemu/QEMU_UEFI_CODE-x86_64.fd
\
-drive if=pflash,format=raw,file=/usr/local/share/edk2-qemu/Android_VARS.fd
&


On Mon, Mar 24, 2025 at 8:56 PM Vitaly Shevtsov <shev.vt1...@gmail.com>
wrote:

> I'm sorry, but it still doesn't work :)
>
> Do you run QEMU as root to be able to pass USB devices or as a non-root
> user?
>
> I use the following to run VM in QEMU:
> qemu-system-x86_64 -m 4G -cpu host -smp 4 -M q35 -accel nvmm -usb
> -device usb-host -drive file=vm.qcow2 -nic user,model=e1000 -rtc
> base=localtime
> And I get the this error:
> qemu-system-x86_64: libusb_kernel_driver_active: -12 [NOT_SUPPORTED]
>
> Whichever bus/port I try, it always ends up with this error? What did I
> miss?
>
> On Tue, Mar 25, 2025 at 12:37 AM Vitaly Shevtsov <shev.vt1...@gmail.com>
> wrote:
> >
> > This is what I was looking for.
> >
> > Thanks! :)
> >
> > On Tue, Mar 25, 2025 at 12:32 AM Manuel Bouyer <bou...@antioche.eu.org>
> wrote:
> > >
> > > On Mon, Mar 24, 2025 at 11:59:00PM +0500, Vitaly Shevtsov wrote:
> > > > Hello!
> > > >
> > > > Was anyone able to pass through a USB device in QEMU? When I try
> using
> > > > `-usb -device usb-host`, I get the following error:
> > > > qemu-system-x86_64: libusb_kernel_driver_active: -12 [NOT_SUPPORTED]
> > > >
> > > > Is it even supported?
> > >
> > > See https://mail-index.netbsd.org/tech-kern/2025/02/25/msg030094.html
> > >
> > > with some kernel hacking I've got the control endpoint to work in the
> > > guest, but any bulk transfert would hang qemu
> > >
> > > --
> > > Manuel Bouyer <bou...@antioche.eu.org>
> > >      NetBSD: 26 ans d'experience feront toujours la difference
> > > --
>


-- 
Mario.

Reply via email to