<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body text="#000000" bgcolor="#ffffff">
    On 06/30/2010 05:18 AM, Feng Dan Liu wrote:
    <blockquote
cite="mid:OFC6EC1CEF.B5D21618-ON48257752.0023D82D-48257752.00331FCF@cn.ibm.com"
      type="cite">
      <br>
      <font face="sans-serif" size="2">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.</font>
      <br>
      <br>
      <font face="sans-serif" size="2">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!</font>
      <br>
      <br>
      <a moz-do-not-send="true"
href="http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListInterfaces"><tt><font
            color="blue" size="3"><u>virConnectListInterfaces</u></font></tt></a>
      <br>
      <a moz-do-not-send="true"
href="http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfDefinedInterfaces"><tt><font
            color="blue" size="3"><u>virConnectNumOfDefinedInterfaces</u></font></tt></a>
      <br>
      <a moz-do-not-send="true"
href="http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfInterfaces"><tt><font
            color="blue" size="3"><u>virConnectNumOfInterfaces</u></font></tt></a>
      <br>
      <a moz-do-not-send="true"
href="http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListDefinedInterfaces"><tt><font
            color="blue" size="3"><u>virConnectListDefinedInterfaces</u></font></tt></a>
      <br>
      <a moz-do-not-send="true"
href="http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceLookupByName"><tt><font
            color="blue" size="3"><u>virInterfaceLookupByName</u></font></tt></a>
      <br>
      <br>
      <br>
    </blockquote>
    <br>
    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).<br>
    <br>
    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).<br>
    <br>
    netcf information can be found at <a class="moz-txt-link-freetext" href="https://fedorahosted.org/netcf">https://fedorahosted.org/netcf</a>,
    and there is a mailing list at
    <a class="moz-txt-link-freetext" href="https://fedorahosted.org/mailman/listinfo/netcf-devel">https://fedorahosted.org/mailman/listinfo/netcf-devel</a>.<br>
    <br>
    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.<br>
    <br>
    (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.)<br>
    <br>
  </body>
</html>