Hi,
I'm trying to emulate a USB thumb drive from a .img file. My current arguments for that look like this:
-drive file=/path/to/file.img,if=none,id=drive-usb0,format=raw -device nec-usb-xhci,id=xhci -device usb-storage,bus=xhci.0,id=drive-usb0,drive=drive-usb0,removable=on,serial=0123456789abcdef
It works but the device shows up as
46f4:0001 (vendor="QEMU", product="QEMU USB HARDDRIVE") which my guest really doesn't like. Is there a way to change the vendor id and product id? I looked everywhere, the manpage, forums, I even asked ChatGPT in desperation(which surprisingly kinda worked. It told me about the "serial" parameter which I also needed to spoof.), nothing.
All I found was an email on this mailing list:
https://lists.nongnu.org/archive/html/qemu-discuss/2015-07/msg00072.html (I don't know how to properly link a thread, this is my first time using a mailing list, sorry)
It contains a hacky(as described by the author themself) patch to take vid and pid but it's from 2015 and uses "-usbdevice disk" which is deprecated, I believe.
Is there a way to set vid and pid in current versions of QEMU or do I need to adjust that patch to "-drive usb-storage" myself?
Thanks in advance