KVM Issue
running CentOS 6… have had a KVM linux vm (also C6) going for quite awhile that depends on a USB device mapping (a external audio DAC module).
I updated the host today (yum update), it had been awhile (was like 6.5
before, now its 6.8+), and rebooted. the VM won’t restart.
when I try and restart it, I get this
Error restoring domain: internal error Did not find USB device 8bb:2704
bus:5 device:4
Traceback (most recent call last):
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 44, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 65, in tmpcb
callback(*args, **kwargs)
File “/usr/share/virt-manager/virtManager/domain.py”, line 1125, in startup
self._backend.create()
File “/usr/lib64/python2.6/site-packages/libvirt.py”, line 686, in create
if ret == -1: raise libvirtError (‘virDomainCreate() failed’, dom=self)
libvirtError: internal error Did not find USB device 8bb:2704 bus:5 device:4
using virsh edit mydomain, I see…
and on the host, lsusb shows…
# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 002: ID 08bb:2704 Texas Instruments Audio Codec
note the TI Audio device is bus 5, dev 2. Why is KVM insisting its bus 5 dev 4? I’ve deleted the device from the VM and tried to start it, same error. i’ve looked in every kvm/qemu related conf file I can find, no sign of bus 5 dev 4.
# virsh start mydomain error: Failed to start domain mydomain error: internal error Did not find USB device 8bb:2704 bus:5 device:4
how can I fix this?
2 thoughts on - KVM Issue
Have you tried a “virsh detach-device …” and then the corresponding
[re-]attach (or maybe even just a new “attach” first)?
When my guest complains about the USB not being there I can generally make things work with:
virsh attach-device –file usb_device.xml –current
where the “usb_device.xml” file has the six lines you included above from your “virsh edit”. Since your guest isn’t running I think you’d have to use “–config”, rather than “–current” on that line.
It’s not obvious that that will clear up your assignment problem, but it might be worth a shot.
all sorts of combinations like that,.
turned out, after hours of head banging, I needed to do a –force-start
virsh start mydomain –force-start
and voila, no problems, USB device picked up at its new address, etc.