Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: VM won't start when added a usb host device to a KVM vm

  1. #1
    Join Date
    Feb 2009
    Location
    Netherlands
    Posts
    73

    Default VM won't start when added a usb host device to a KVM vm

    When I add a usb host device to a KVM vm (WinXP) on openSUSES 13.1 x86_64 (recently upgraded from 12.3). I get the following error when I try to start the virtual machine.

    Code:
    Error starting domain: internal error: process exited while connecting to monitor: qemu-system-x86_64: -device usb-host,hostbus=2,hostaddr=3,id=hostdev0: Parameter 'driver' expects device type
    
    
    Traceback (most recent call last):
      File "/usr/share/virt-manager/virtManager/asyncjob.py", line 100, in cb_wrapper
        callback(asyncjob, *args, **kwargs)
      File "/usr/share/virt-manager/virtManager/asyncjob.py", line 122, in tmpcb
        callback(*args, **kwargs)
      File "/usr/share/virt-manager/virtManager/domain.py", line 1218, in startup
        self._backend.create()
      File "/usr/lib64/python2.7/site-packages/libvirt.py", line 866, in create
        if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
    libvirtError: internal error: process exited while connecting to monitor: qemu-system-x86_64: -device usb-host,hostbus=2,hostaddr=3,id=hostdev0: Parameter 'driver' expects device type
    I'm doing this from the Virtual Machine Manager.

    Is this a bug, or am I doing something wrong?

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: VM won't start when added a usb host device to a KVM vm

    Quote Originally Posted by wvv View Post
    When I add a usb host device to a KVM vm (WinXP) on openSUSES 13.1 x86_64 (recently upgraded from 12.3). I get the following error when I try to start the virtual machine.

    Code:
    Error starting domain: internal error: process exited while connecting to monitor: qemu-system-x86_64: -device usb-host,hostbus=2,hostaddr=3,id=hostdev0: Parameter 'driver' expects device type
    
    
    Traceback (most recent call last):
      File "/usr/share/virt-manager/virtManager/asyncjob.py", line 100, in cb_wrapper
        callback(asyncjob, *args, **kwargs)
      File "/usr/share/virt-manager/virtManager/asyncjob.py", line 122, in tmpcb
        callback(*args, **kwargs)
      File "/usr/share/virt-manager/virtManager/domain.py", line 1218, in startup
        self._backend.create()
      File "/usr/lib64/python2.7/site-packages/libvirt.py", line 866, in create
        if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
    libvirtError: internal error: process exited while connecting to monitor: qemu-system-x86_64: -device usb-host,hostbus=2,hostaddr=3,id=hostdev0: Parameter 'driver' expects device type
    I'm doing this from the Virtual Machine Manager.

    Is this a bug, or am I doing something wrong?
    You'll need to better describe how you attempted to add the USB device.
    Although the following SDB is for SUSE Enterprise SP3, it applies completely to current openSUSE as well.

    It should describe a number of things related to using USB devices, perhaps the two main methods of virtualized I/O and USB Pass-through.

    https://www.suse.com/documentation/s.../book_kvm.html

    If you still have problems, post again.

    HTH,
    TSU

  3. #3
    Join Date
    Feb 2009
    Location
    Netherlands
    Posts
    73

    Default Re: VM won't start when added a usb host device to a KVM vm

    Quote Originally Posted by tsu2 View Post
    You'll need to better describe how you attempted to add the USB device.
    I used the Virtual Machine Manager. On de details page for the vm I clicked "+ Add hardware". Selected USB host device. And on the right I selected the Host Device I wanted to add. And then "Finish". After that the usb device is visible in the hardware list of the vm, with it's ID number. But when I try to start the changed vm, all I get is the error...

    Quote Originally Posted by tsu2 View Post
    Although the following SDB is for SUSE Enterprise SP3, it applies completely to current openSUSE as well.

    It should describe a number of things related to using USB devices, perhaps the two main methods of virtualized I/O and USB Pass-through.

    https://www.suse.com/documentation/s.../book_kvm.html
    I want to add a USB Pass-through device from the host to the vm, but this description doesn't help much...

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: VM won't start when added a usb host device to a KVM vm

    For starters,
    Need to know what kind of USB device this is.

    Then, what you either tried or didn't and any error messages returned after each of your tries.

    TSU

  5. #5
    Join Date
    Feb 2009
    Location
    Netherlands
    Posts
    73

    Default Re: VM won't start when added a usb host device to a KVM vm

    Quote Originally Posted by tsu2 View Post
    For starters,
    Need to know what kind of USB device this is.
    Does that matter when you try to pass-through the device to the guest?

    But it's wibu-key:

    Code:
    usb 2-1.2: new full-speed USB device number 5 using ehci-pci
    usb 2-1.2: New USB device found, idVendor=064f, idProduct=0bd7
    usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    usb 2-1.2: Product: WIBU-BOX/U
    usb 2-1.2: Manufacturer: WIBU-SYSTEMS AG, www.wibu.com
    Then, what you either tried or didn't and any error messages returned after each of your tries.
    What I tried and the error message I get is specified in detail in a previous message...

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: VM won't start when added a usb host device to a KVM vm

    OK,
    Pls verify that a wibu-key is used for multi-factor authentication.

    I don't have much experience looking at using USB keys for multi-factor authentication, but IMO it likely is one of the types of devices that has to be given exclusive access to the Guest, you cannot just configure it as any generic USB device(which appears to be what you likely did from your original post).

    So, if you're having problems setting it up using the reference I posted, pls post your exact steps, or if you can't figure out the reference any other Q you may have.
    I assume that you know you will have to configure the Guest according to use the certificates on the wibu-key which further involves steps I haven't personally done.

    TSU

  7. #7
    Join Date
    Feb 2009
    Location
    Netherlands
    Posts
    73

    Default Re: VM won't start when added a usb host device to a KVM vm

    Quote Originally Posted by tsu2 View Post
    Pls verify that a wibu-key is used for multi-factor authentication.
    What is multi-factor authentication?

    I don't have much experience looking at using USB keys for multi-factor authentication, but IMO it likely is one of the types of devices that has to be given exclusive access to the Guest, you cannot just configure it as any generic USB device(which appears to be what you likely did from your original post).
    There is no configuration for usb devices in the Virtual Machine Manager. You can only select them, to add them to your virtual machine. And that should be enough. The host just has to pass through any communcation to and from the device from the virtual machine verbatim. That's what "pass through" suggests anyway!

    What the error message suggests IMHO: "libvirtError: internal error: process exited while connecting to monitor: qemu-system-x86_64: -device usb-host,hostbus=2,hostaddr=3,id=hostdev0: Parameter 'driver' expects device type". That there is a problem/bug in the interfacing python code between the Virtual Machine Manager, and libvirt...?

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: VM won't start when added a usb host device to a KVM vm

    In the document I referenced,
    USB Host Device Pass-through A physical USB device may be passed from the VM Host Server to the VM Guest. Given the very wide variety of USB devices available, it is anticipated that some devices may not work properly.
    That said,
    I recommend
    Section 7.3.1 following instructions for configuring <system> access to a Regular User
    Section 13.3.3 talks about what I described earlier. <Read this closely>
    If emulation is to work, my guess is that your device needs to be configured as a serial device, but that is only a guess
    13.3.3.2. USB Pass-Through I tend to believe that emulation as a whole <will not work> because of the type of device it is. If so, then IMO <this is what you need to do>

    Optionally, if a USB controller is not available (or just create one anyway if you want)
    Section 9.5 and/or 9.6

    So, what is "multi-factor authentication?"
    Googling should provide you an answer, but my definition is using more than one type of credentials to authenticate. So, in this case I'm guessing your USB key provide certificates and in combination with your entering Username/Password provides 2 ways for you to be authenticated to do something. Or, of course, the key's certs by themselves might be sufficient for the Authenticator, whatever it is.

    HTH,
    TSU

  9. #9
    Join Date
    Feb 2009
    Location
    Netherlands
    Posts
    73

    Default Re: VM won't start when added a usb host device to a KVM vm

    Hi TSU,

    Before I'm going to follow your recommendations, I want to make sure we are on the right track here. And I like you to comment on the following to tests I did:

    First I connected an external usb HDD to the host machine (that's working fine and is being detected properly by the host). When I add it to the VM and try to start it, I get the same error:

    Code:
    Error starting domain: internal error: process exited while connecting to monitor: qemu-system-x86_64: -device usb-host,hostbus=2,hostaddr=6,id=hostdev0: Parameter 'driver' expects device type
    
    
    Traceback (most recent call last):
      File "/usr/share/virt-manager/virtManager/asyncjob.py", line 100, in cb_wrapper
        callback(asyncjob, *args, **kwargs)
      File "/usr/share/virt-manager/virtManager/asyncjob.py", line 122, in tmpcb
        callback(*args, **kwargs)
      File "/usr/share/virt-manager/virtManager/domain.py", line 1221, in startup
        self._backend.create()
      File "/usr/lib64/python2.7/site-packages/libvirt.py", line 866, in create
        if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
    libvirtError: internal error: process exited while connecting to monitor: qemu-system-x86_64: -device usb-host,hostbus=2,hostaddr=6,id=hostdev0: Parameter 'driver' expects device type
    Only the 'hostaddr' (of course) differs from the error I get, when doing the same with the usb key.

    Another test on a Windows 7 host machine with the usb key, and a virtual Windows XP under VirtualBox as hypervisor: It just works: "click" to add the usb key to the VM, and it is detected and working properly in the virtual XP machine. No special configuration needed at all!

  10. #10
    Join Date
    Feb 2009
    Location
    Netherlands
    Posts
    73

    Default Re: VM won't start when added a usb host device to a KVM vm

    To make things more clear I also made two screen grabs. The first shows how I'm adding the external usb HDD to the vm. The second shows where I'm trying to start the vm, and the error message that's displayed.




Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •