[libvirt-users] VM dies with error regarding "virConnectNumOfInterfaces"

Laine Stump laine at laine.org
Sat Jul 21 06:12:19 UTC 2012


On 07/20/2012 05:12 PM, Helga Velroyen wrote:
> Hi!
>
> 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.


> 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.

In the meantime, it would be helpful when reporting problems to tell us
the version of libvirt and qemu that are installed.
>
> 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.

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.

3) Just to verify that the problem really is in the USB device
definition, use virsh edit to remove it, then retry the start.




More information about the libvirt-users mailing list