Hi Laine,
Thank you for your reply, I just want to verify if these libvirt functions
can be used to get the physical interface information when using kvm
hypervisor.
It's a good news that Red Hat Enterprise Linux will have a port of netcf
library :)
(P.S. I used RHEL5.5 and here are the errors which you can't see in the
last mail:
virsh command error:
$virsh iface-list --all
error: Failed to list active interfaces
error: This function is not supported by the hypervisor:
VirConnectNumOfInterface
libvirt api call error:
libvir: error : this function is not supported by the hypervisor:
virConnectNumOfInterfaces
org.libvirt.LibvirtException: this function is not supported by the
hypervisor: virConnectNumOfInterfaces )
Best Regards,
Fengdan Liu
Tivoli ITCAM Solution, IBM China Software Development Lab,
Tel: 13811762746
Email: liufengd(a)cn.ibm.com
3/F, Haohai Bldg., No.7, 5th Street, Shangdi,
Haidian District, Beijing 100085, P.R.China
Laine Stump <laine(a)laine.org>
Sent by: sendmail <justsendmailnothingelse(a)gmail.com>
2010-07-01 00:19
To
Feng Dan Liu/China/IBM@IBMCN
cc
libvir-list(a)redhat.com, Flo Kandefer <kandefer(a)us.ibm.com>, Todd Gatts
<tgatts(a)us.ibm.com>, Bruce Anderson <andersbc(a)us.ibm.com>, Jennifer
Kuvlesky <jkuvlesk(a)us.ibm.com>
Subject
Re: [libvirt] Ask for help about libvirt error: can't get physical
interface data for kvm.
On 06/30/2010 05:18 AM, Feng Dan Liu wrote:
I saw both libvirt api and virsh commands support to get the physical
interfaces data, but it always fail when I using them for KVM hypervisor.
I was thought that it was due to the old version of libvirt/KVM
hypervisor, but the error still exist when using the latest libvirt and
kvm hypervisor.
So I wonder if the following functions of libvirt haven't been implemented
for KVM, could you pls help me get the answer about this? Thanks in
advance!
virConnectListInterfaces
virConnectNumOfDefinedInterfaces
virConnectNumOfInterfaces
virConnectListDefinedInterfaces
virInterfaceLookupByName
Just to make sure you understand what these functions do - they are used
to examine and configure the interfaces on the *physical host* that is
running the hypervisor, not the virtual hosts (guests) running under that
hypervisor. (One of the main motivations to add this API was to make it
easier for management software to create bridge devices on the host, for
use by the guests).
These functions only work on a system that has the netcf library installed
(regardless of hypervisor). Currently, only Fedora (12 and beyond), and
Red Hat Enterprise Linux 6 (in beta) have a port of that library, although
there has been some talk of a Suse port (and also someone was supposedly
working on a Gentoo port last year, but I never saw anything more about
that).
netcf information can be found at
https://fedorahosted.org/netcf, and
there is a mailing list at
https://fedorahosted.org/mailman/listinfo/netcf-devel.
Patches to port netcf to other platforms are gratefully accepted. If you
are running on a platform that doesn't have netcf support and would like
to take on that task, please send mail to the list and we'll do what we
can to help.
(P.S. When you send mail to the libvirt list, you should probably try to
avoid embedded graphics, as you have used to show your error message -
many people reading the list are using text-only mail readers, and won't
be able to see the graphical content.)