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:
- Disabled AppArmor temporarily, based on https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1552241
- Changed group of the usb device using udev rules, based on https://unix.stackexchange.com/questions/498451/qemu-usb-passthrough-broken-after-ubuntu-18-04-upgrade
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!
0 Answers