USB emulation

QEMU can emulate a PCI UHCI, OHCI, EHCI or XHCI USB controller. You can plug virtual USB devices or real host USB devices (only works with certain host operating systems). QEMU will automatically create and connect virtual USB hubs as necessary to connect multiple USB devices.

Connecting USB devices

USB devices can be connected with the -device usb-... command line option or the device_add monitor command. Available devices are:

usb-mouse

Virtual Mouse. This will override the PS/2 mouse emulation when activated.

usb-tablet

Pointer device that uses absolute coordinates (like a touchscreen). This means QEMU is able to report the mouse position without having to grab the mouse. Also overrides the PS/2 mouse emulation when activated.

usb-storage,drive=drive_id

Mass storage device backed by drive_id (see the chapter in the System Emulation Users Guide)

usb-uas

USB attached SCSI device, see for details

usb-bot

Bulk-only transport storage device, see for details here, too

usb-mtp,rootdir=dir

Media transfer protocol device, using dir as root of the file tree that is presented to the guest.

usb-host,hostbus=bus,hostaddr=addr

Pass through the host device identified by bus and addr

usb-host,vendorid=vendor,productid=product

Pass through the host device identified by vendor and product ID

usb-wacom-tablet

Virtual Wacom PenPartner tablet. This device is similar to the tablet above but it can be used with the tslib library because in addition to touch coordinates it reports touch pressure.

usb-kbd

Standard USB keyboard. Will override the PS/2 keyboard (if present).

usb-serial,chardev=id

Serial converter. This emulates an FTDI FT232BM chip connected to host character device id.

usb-braille,chardev=id

Braille device. This will use BrlAPI to display the braille output on a real or fake device referenced by id.

usb-net[,netdev=id]

Network adapter that supports CDC ethernet and RNDIS protocols. id specifies a netdev defined with -netdev …,id=id. For instance, user-mode networking can be used with

qemu-system-x86_64 [...] -netdev user,id=net0 -device usb-net,netdev=net0
usb-ccid

Smartcard reader device

usb-audio

USB audio device

u2f-{emulated,passthru}

Universal Second Factor device