[SOLVED] Hypervisor, Aeotec USB Stick device ID changes itself

I know it’s more a OS topic, but I can’t find the solution on google.
I’ve installed Ubuntu with KVM as hypervisor and openhab in a VM, also on Ubuntu.
then I run “lsusb” to see:

lsusb
Bus 003 Device 006: ID 0658:0200 Sigma Designs, Inc.

I add the device with “sudo virsh edit openHAB” somewhere within “devices”:

<hostdev mode='subsystem' type='usb' managed='yes'>
    <source>
      <vendor id='0x0658'/>
      <product id='0x0200'/>
    </source>
  </hostdev>

strange, I do not see the USB stick when I start openHAB. so I manually attach the USB stick via the virsh-manager GUI and can then see the stick in openhab. I can include zwave devices, works fine for some time.
but somewhen I receive the following message and zwave stops to work:

2019-01-14 17:22:01.171 [ERROR] [ing.zwave.handler.ZWaveSerialHandler] - Got I/O exception Input/output error in writeArray during sending. exiting thread.

I figured out that the device ID on the hypervisor for the USB Stick changed:

Bus 003 Device 007: ID 0658:0200 Sigma Designs, Inc.

how can I make the device ID persistent for the virtual machine?

Take your favorite search engine and look for usb passthrough

already tried usb passthrough, the problem is somewhere else.
on the host I see:

matthias@homeserver:~$ lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 1: Dev 9, If 0, Class=Communications, Driver=usbfs, 12M
    |__ Port 1: Dev 9, If 1, Class=CDC Data, Driver=usbfs, 12M

when I assign it to the VM it shows up with:

matthias@openhab:~$ lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    |__ Port 1: Dev 2, If 0, Class=Communications, Driver=cdc_acm, 12M
    |__ Port 1: Dev 2, If 1, Class=CDC Data, Driver=cdc_acm, 12M

is it ok that the VM uses different drivers? are these usb 2.0 drivers?
when the problem occurs I see on the host the following dmesg message:

[  743.929434] usb 3-1: reset full-speed USB device number 9 using xhci_hcd
[  804.654686] usb usb3-port1: disabled by hub (EMI?), re-enabling...
[  804.654757] usb 3-1: USB disconnect, device number 9
[  804.928175] usb 3-1: new full-speed USB device number 10 using xhci_hcd
[  805.077207] usb 3-1: New USB device found, idVendor=0658, idProduct=0200
[  805.077212] usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[  805.078031] cdc_acm 3-1:1.0: ttyACM0: USB ACM device

then, on the openHAB VM the usb-stick device disappers:

matthias@openhab:~$ lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
matthias@openhab:~$

any idea what could be wrong?

In all the years I’ve been supporting OH on this forum, this is the first I’ve seen mention working with KVM. I think you will have much better luck posting to a KVM forum. This isn’t an OH problem and I don’t think there is anyone here with experience on KVM who can help.

It seems that your hosts resets the USB stick - something it should not do. Maybe try another USB (root) Port.

I have been using OH on a KVM machine and never had that problem - nowadays I only use LXC Containers so I don’t know how to have a USB passthrough wich always points to the same /dev/ devices.

it was indeed a host issue. I updated the laptops firmware and the failure is gone. all is fine… thanks