How to emulate USB-device as "alive" on VM?

Viewed 219

Step by step:

  1. My PC has connected printer via USB (I know VID:XXXX and PID:YYYY)
  2. I took image of my PC and put inside virtual machine (VMWare)
  3. Of course image on my VM doesn't has connected USB-printer (because real printer is connected to my real USB-port on my real PC).
  4. One program is running and checking accessibility of printer by check connection with the printer via USB (I don't know how exactly - maybe via WMI, maybe via other way).
  5. Results: a) on my real PC this program works b) on image doesn't work

QUESTION: is possible to emulate on VM-side that USB-port (VID:XXXX and PID:YYYY) is alive? Thanks.

P.S. I don't want to install USB-redirect-via-TCP or similar approach.

1 Answers

You should switch to the QEMU emulator and to Linux to do that. VMWare probably doesn't support this of thing especially in a Windows environment.

If you are already on Linux, QEMU has hardware emulation of the xHCI and you can assign the host USB devices to KVM (read here: https://www.linux-kvm.org/page/USB_Host_Device_Assigned_to_Guest).

On Windows, I don't think this will be possible.

Related