On Tue, Dec 08, 2009 at 10:23:41PM +0100, Jaromír Červenka wrote:
Hi,
while writing SharpLibVirt I ran into several problems with some functions:
virDomainInterfaceStats
------------------------------------
It is not possible get any result, because of error "invalid argument
in invalid path, 'user.0' is not a known interface". But inside LOG
for this domain is
"... -net user,vlan=0,name=user.0 ... "
It is not possible get stats for nic.0 also. Tested on KVM hypervisor.
For KVM the interfaces are called things like "vnet0", "vnet1" etc.
What you should do is call virDomainGetXMLDesc[1] on the domain of
interest, and then parse out the /domain/devices/interface/target node
from the XML. The dev attribute gives the network name[2].
virt-top contains code to do this.
[1]
http://libvirt.org/html/libvirt-libvirt.html#virDomainGetXMLDesc
[2]
http://libvirt.org/formatdomain.html#elementsNICSVirtual
virStoragePoolIsActive and virStoragePoolIsPersistent
-------------------------------------------------------------------------------
Both cause crash of libvirt deamon. I dont know why.
Tested on 0.7.4 and Qemu 0.11.0
If there isn't a bug about this, then please file one.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming blog:
http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora