Hi! thanks for your mail! See my answers inline.
> I ran into a problem using a USB device and was wondering if > > you could help me. > > > > I'm running a Win XP SP3 in a VM with libvirt on a Xubuntu 11.10. > > I configured it to talk to several USB devices. > > > > With one particular device (a Phonak Compilot[1], admittedly a probably > > rather unusual device), the VM dies with the following error in the > > libvirtd.log: > > > > 2012-07-20 21:04:19.591+0000: 1282: error : > > virConnectNumOfInterfaces:9803 : this function is not supported by the > > connection driver: virConnectNumOfInterfaces > > This message is guaranteed unrelated to your guest dying. It means that > some management program (for example virt-manager) is trying out the > "virInterface" part of libvirt's API, and discovering that your platform > does not support that part of the API. the virInterface functions deal > with configuring and reporting the status of the host's network devices > (physical ethernets, bridges, bonds), are only supported on platforms > that have the "netcf" library, and are optional. Ubuntu is only just now > getting netcf support into their distro, do Xubuntu 11.10 will certainly > not have it. > > TL;DR ignore the error about virConnectNumOfInterfaces. > > Okay, thanks for the explanation! I appreciate it. > > 2012-07-20 21:05:05.762+0000: 1276: error : qemuMonitorIO:603 : internal > > error End of file from monitor > > This just means that the qemu process terminated abruptly. If you look > in /var/log/libvirt/qemu/${guestname}.log, you may find a more specific > error message issued by qemu itself. > Okay, I did that and here is the full log of my try to start it up: 2012-07-23 09:30:37.761+0000: starting up LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-1.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name toddler -uuid 1e9ada35-5681-5060-476e-7a9e615fcb5c -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/toddler.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -no-shutdown -drive file=/media/frog/vms/toddler_storage.img,if=none,id=drive-ide0-0-0,format=qcow2 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive if=none,media=cdrom,id=drive-ide0-0-1,readonly=on,format=raw -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=19,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:49:f6:46,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -usb -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -vga std -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device usb-host,hostbus=1,hostaddr=3,id=hostdev0 -device usb-host,hostbus=1,hostaddr=4,id=hostdev1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 char device redirected to /dev/pts/4 kvm: usb-linux.c:1211: usb_linux_update_endp_table: Assertion `epd->type == 255' failed. 2012-07-23 09:31:58.723+0000: shutting down Any idea what this assertion means? Googling did not really help me here. In the meantime, it would be helpful when reporting problems to tell us > the version of libvirt and qemu that are installed. > virsh -v gives me version 0.9.8, version of my qemu-kvm package is "1.0+noroms-0ubuntu13" I installed those simply by using aptitude, I did not do anything special here. > > > > This happens no matter if is it the only configured USB device or if > > there is another USB device present in the config or not. > > > > I configured it doing the following steps: > > > > - I looked up the vendor / product ID using lsub > > > > Bus 001 Device 003: ID 180f:1002 > > > > (Interestingly, it does not show a name of the device here.) > > > > - I added it to the VM's xml configuration using virsh / edit $vmname > > > > <domain> > > ... > > <devices> > > ... > > <hostdev mode='subsystem' type='usb' managed='no'> > > <source> > > <vendor id='0x180f'/> > > <product id='0x1002'/> > > </source> > > </hostdev> > > ... > > </devices> > > </domain> > > > > - I run the VM using the virt-manager UI. > > > > Any ideas what the problem could be? Do I need to run/configure > > differently than how I did it? > > The XML looks fine to me (the "managed='no'" part would only be relevant > for PCI devices, not USB, but it would be ignored in this case, so > that's not a problem). > > To help figure out what may be the problem, do this: > > 1) try starting the guest from the shell with "virsh start > ${guestname}", and send any error message that produces. Also let us > know the versions of libvirt ("virsh -v" will give you that) and qemu > (or kvm - different platforms have different names for the packages) - > various older versions of libvirt have various bugs, and knowing the > version helps us to narrow down possibilities. > Versions as mentioned above: libvirt 0.9.8 and kvm-qemu 1.0+noroms-0ubuntu13 I tried to run the guest from the shell, but it does not show much: > virsh start $guestname WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-hiKzI0/pkcs11: No such file or directory Domain $guestname started (I guess the keyring warning does not matter since it also appears when I run the vm without the troublesome USB device and then the guest does not die.) Other than that, nothing happens here. At the same time I observed the log of the guest. The result is the same as mentioned in this email further up. > > 2) After virsh start fails, look at the end of > /var/log/libvirt/qemu/${guestname}.log - send everything starting from > the last qemu (or maybe it's kvm in your distro) commandline to the end > of the file. > See above. Same as before. 3) Just to verify that the problem really is in the USB device > definition, use virsh edit to remove it, then retry the start. > Did so, the guest starts without any problems. I checked the log which looks the same with the exception that the line with the failed assertion is not there. Thanks for your help so far, I hope you can give me a hint what the problem is! Cheers, Helga
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users