[libvirt-users] Reconnection problem with a USB device

Dale Amon amon at vnl.com
Tue Jun 12 18:02:09 UTC 2012


This is going to be a bit off the wall as I doubt
many people are using a VM in quite the same manner
as I am in this case.

I have a new scanner at home, a Mustek A3USB 1200 Pro, which
requires a vendor supplied version of libsane to run. That is
a pain in the behind just to start with. To use that scanner
requires a 32b machine with sufficiently old versions of
various libraries. My primary machine, a laptop, is 64b and
runs current software. So, in order to use my inexpensive
large format scanner, I had to set up a 32b VM on my laptop that
is running an old linux. 

I tunneled the USB device to it:

    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x055f'/>
        <product id='0x040b'/>
        <address bus='3' device='8'/>
      </source>
      <alias name='hostdev0'/>
    </hostdev>

That works fine... until I have to go into the office. Once I
disconnected the USB go away for 10 hours and come back, it
fails to re-engage. The USB seems to get grabbed up by the
laptop itself instead of the VM. The only way to get it to
work again is to halt the VM and do a cold boot of it. This is
annoying to say the least because I lose 'state' when I boot,
ie the set of windows and files open that remind me of where
I left off on a project before going to work.

Any suggestions how to get around this annoying issue?




More information about the libvirt-users mailing list