The officially official Devuan Forum!

You are not logged in.

#1 2025-11-03 02:40:24

zapper
Member
Registered: 2017-05-29
Posts: 1,176  

usb controllers and qemu

Anyone know how to pass a usb controller for say something like mupen64plus, to a virtual machine?

What options exist out of curiosity?

Mostly interested in qemu options for this though.

IE, so that the virtual machine works in qemu.


Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term  If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD Gnuinos
Peace Be With us All!

Offline

#2 2025-11-03 04:05:50

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,521  

Re: usb controllers and qemu

You might use the following qemu command line arguments for usb passthrough:

-device qemu-xhci,id=usb-bus \
-device usb-host,vendorid=0x0000,productid=0x1111

with of course the right vendor and product ids replacing 0x0000 and 0x1111.

The device must be plugged in when qemu starts. If you want to support removing and reinserting, you'll need to use the first "-device ..." argument only, and then the qemu monitor command line to add the device, with different but near enough similar syntax.

Before then, the user running qemu must have path access to the /dev/bus/usb/*/* devnode for the usb device to access.

To that end you might for example add GROUP="plugdev" appropriately in /lib/udev/rules.d/50-udev-default.rules, and make the user member of the plugdev group, and then the user gains access right whenever the device is blugged in.

It's also possible to refer to the device using the bus and device id.

Offline

#3 2025-11-03 14:00:52

zapper
Member
Registered: 2017-05-29
Posts: 1,176  

Re: usb controllers and qemu

@ralph

I figured you were going to say something about usb, bus, device type commands. I was hoping there was an easier way lol.

Oh well...

I just have to figure out now I guess how to find that info. lsusb gives some of it, but not sure if all will be given.


Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term  If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD Gnuinos
Peace Be With us All!

Offline

#4 2025-11-15 20:01:53

tux_99
Member
Registered: 2025-06-17
Posts: 67  

Re: usb controllers and qemu

zapper wrote:

I was hoping there was an easier way lol.

The far easier way would be to use VMware workstation for Linux which nowadays is totally free (as in beer), but you have to register an account with broadcom to download it (anyone can do it, it's not restricted to businesses, and since you don't have to show proof of the details you provide you can basically write whatever you want...).

Last edited by tux_99 (2025-11-15 20:04:57)

Offline

Board footer