1

I have a DS2490 USB 1-wire interface on the home server conway which is attached to one of the virtual machines so that that virtual machine can read the sensors on the 1-wire network. This attachment works when the machine is started, the DS2490 USB 1-wire shows up in the virtual machine fine. From time to time this DS2490 USB 1-wire interface gets confused when I am transmitting on nearby amateur radio so the solution is to detach it from the virtual machine, unplug it from the server, plug it in again and attach it to the virtual machine again. Today this had to be done and I got an unexpected error message on trying to attach it again:

root@conway:~# virsh attach-device --live gosper /etc/onewire-for-gosper.xml
error: Failed to attach device from /etc/onewire-for-gosper.xml
error: internal error: unable to execute QEMU command 'device_add': failed to find host usb device 2:8

In logfile /var/log/libvirt/libvirtd.log:

2022-09-24 21:16:38.655+0000: 10923: error : qemuMonitorJSONCheckError:395 : internal error: unable to execute QEMU command 'device_add': failed to find host usb device 2:8

usb device 2:8 is the right one according to lsusb This seems to be new since I upgraded the homeserver to Devuan beowulf. The previous version in which this all worked fine was Devuan ascii. Current versions of libvirt:

| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                  Version         Architecture Descripti
+++-=====================================-===============-============-=========
ii  libvirt-clients                       5.0.0-4+deb10u1 amd64        Programs 
ii  libvirt-daemon                        5.0.0-4+deb10u1 amd64        Virtualiz
un  libvirt-daemon-driver-storage-gluster                  (no descr
un  libvirt-daemon-driver-storage-rbd                      (no descr
un  libvirt-daemon-driver-storage-zfs                      (no descr
ii  libvirt-daemon-system                 5.0.0-4+deb10u1 amd64        Libvirt d
ii  libvirt-glib-1.0-0:amd64              1.0.0-1         amd64        libvirt G
ii  libvirt0:amd64                        5.0.0-4+deb10u1 amd64        library f

Things I have tried already:

Both solutions haven't managed to fix the problem.

I do notice I can attach the device to another host, have it available there and detach it from that host again without problems!

Koos van den Hout
  • 1,096
  • 6
  • 10
  • I rebooted the whole server so now the USB 1-wire interface is available to the right vm again. This isn't a real solution in my opinion but at least I have my 1-wire measurements available again. – Koos van den Hout Oct 05 '22 at 10:33
  • And the problem returned, so I moved the 1-wire USB interface to a different machine. I'm still open to suggestions how to fix this for good! – Koos van den Hout Oct 15 '22 at 12:41

0 Answers0