Yenya's World

Mon, 23 May 2016

One-time USB-IP

For some ugly proprietary software, I need to access an USB device (a hardware key) from the Windows-based virtual machine. I tried to use USB-IP with mixed results.

At first I created a Windows 2008r2 testing virtual machine. I tried various versions of usbip (both kernel-side drivers and the user-space utility), and finally using some version of drivers with the patched usbip.exe probably from this thread helped and I was able to see the HW token from the inside of the Windows guest, install the proprietary software there, and make it use the token (after disabling the token it complained about missing HW key, so I guess the token was indeed successfully used before). I even tested the token in my Linux workstation as well as in the server where it will be in production use. So far OK.

Now the ugly part: I wanted to create a document describing how to access the HW token from the Windows VM, so I created a new Windows VM. And now I am not able to reproduce the process of installing the drivers and accessing the token from the VM itself :-(. I must have done something what I don't remember exactly, but now I can only list the devices on the server using "usbip.exe -l my.ip.addr", but trying to attach the device with "usbip.exe -a my.ip.addr bus-id" fails with "Cannot find device" error message.

I am not sure what am I doing wrong, but I am sure that it has worked before. I feel like an idiot. Anyway, how would you make an USB device accessible from the inside of the Windows-based VM?

Section: /computers (RSS feed) | Permanent link | 2 writebacks

2 replies for this story:

Mirek Suchy wrote: Passthrough

USB passthrough -

Yenya wrote: Re: passthrough

Thanks, but this is not suitable for my application - my Windows VM will be in a private cloud, so it will not be fixed to any particular physical host. I really need some kind of usb-over-IP. Anyway, after a week or so banging my head against the wall I finally made it work. I am still not sure what was the problem, but the above linked usbip.exe and the version of signed Windows drivers now work for me.

Reply to this story:

URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)


Yenya's World: Linux and beyond - Yenya's blog.


RSS feed

Jan "Yenya" Kasprzak

The main page of this blog



Blog roll:

alphabetically :-)