Hello Laine:<br>I've revised the configuration and followed all your instructions.<br>I'll try to give you a better explain of my problem.<br><br>a) I need a bridged (3) configuration, because I have to connect the guests from each others. (via ssh and execute mpi). I've three hosts, each of one has at least a guest. <br>
I'll only explain about the configuration of one of them, because the problem is only related a one configuration.<br>hostname=rionegro  ip=192.168.1.4<br>guest-name=rnompi1<br><br>b) I've configured host bridge following step by step ther instruction on    <a href="http://wiki.libvirt.org/page/Networking" target="_blank">http://wiki.libvirt.org/page/Networking</a><br>

    this is the /etc/network/config<br><br style="color: rgb(192, 192, 192);"><span style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);"># The loopback network interface</span><br style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">
<span style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">auto lo</span><br style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">
<span style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">iface lo inet loopback</span><br style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">
<br style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);"><span style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);"></span><br style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">
<span style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">auto br0</span><br style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">
<span style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">iface br0 inet static</span><br style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">
<span style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">address 192.168.1.4</span><br style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">
<span style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">netmask 255.255.255.0</span><br style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">
<span style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">network 192.168.1.0</span><br style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">
<span style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">broadcast 192.168.1.255</span><br style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">
<span style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">gateway 192.168.1.10</span><br style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">
<span style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">bridge_ports eth0</span><br style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">
<span style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">bridge_stp on</span><br style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">
<span style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">bridge_fd 0</span><br style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">
<span style="font-family: courier new,monospace; background-color: rgb(192, 192, 192); color: rgb(0, 0, 0);">bridge_maxwait 0</span><br style="font-family: courier new,monospace; background-color: rgb(153, 153, 153);"><br>
c) this is the xml guest configuration related to the network.<br><br><span style="font-family: courier new,monospace; color: rgb(51, 0, 0); background-color: rgb(192, 192, 192);">    <interface type='bridge'></span><br style="font-family: courier new,monospace; color: rgb(51, 0, 0); background-color: rgb(192, 192, 192);">
<span style="font-family: courier new,monospace; color: rgb(51, 0, 0); background-color: rgb(192, 192, 192);">      <source bridge='br0'/></span><br style="font-family: courier new,monospace; color: rgb(51, 0, 0); background-color: rgb(192, 192, 192);">
<span style="font-family: courier new,monospace; color: rgb(51, 0, 0); background-color: rgb(192, 192, 192);">    </interface></span><br style="font-family: courier new,monospace;"><br><br>d) But the guest doesn't get any IP automatically, and create an interface with a variable name (eth4, eth5,etch6..)<u>. I don't know how to achieve the guest don't behave like this and create always its network interface </u>with a fixed name, for example, eth0).<br>
<br>Why I ask that?<br><br>if the guest created an interface with a fixed name, I would configure and static ip for the it.<br>I'm attaching a printscreen "rnompi1.jpg"  that show what ifconfig ahow on the guest (eth14 and without any IP). It doesn't get their host either.<br>
<br>The only way I achieve to solve but "temporally" until reboot is configuring the guest statically using the name of the interface that has just up.In that case every works fine, and the guest can connect to all the other guests on the lan and others can connect to it. <br>
But this only works until reboot or reconfigure the guest, because each time the name of interface change, and my configuration I had done of /etc/network/interface didn't work any more because is related to another interface.<br>
<br>I hope I've explained better the problem I have.<br><br>Thank you very much, you've already helped too much to better understand the different cases of network configuration<br><br>Regards.<br><br><br><br><br>
<div class="gmail_quote">2011/2/10 Marcela Castro León <span dir="ltr"><<a href="mailto:mcastrol@gmail.com">mcastrol@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello Laine:<br>Thank you very much. <br>I've showed only one of the guest, each one have it's own ip address. Anyway, I'll follow your advise of revise all the configuration after reading the doc.<br>Thank you very much again.<br>

Regards.<br><br><div class="gmail_quote">2011/2/8 Laine Stump <span dir="ltr"><<a href="mailto:laine@laine.org" target="_blank">laine@laine.org</a>></span><div><div></div><div class="h5"><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">



  
    
  
  <div bgcolor="#ffffff" text="#000000">
    (For future questions such as this, you may find you get a better
    response (and lower signal-noise ratio) by asking on the recently
    -created <a href="mailto:libvirt-users@redhat.com" target="_blank">libvirt-users@redhat.com</a> list, as libvir-list has a very
    large volume of patches and discussion about the internals of
    libvirt)<div><br>
    <br>
    On 02/08/2011 12:05 PM, Marcela Castro León wrote:
    <blockquote type="cite">Hello <br>
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
        </blockquote>
      </div>
      I've a lan of virtual machine configured with bridge. I've a
      private lan of 4 machine, but one of them have 2 lan-card with
      access to internet. <br>
      <br>
      Evertything works almost fine, except that I've configured on each
      guest the static configuration of the bridge with the ip address,
      like this:<br>
      <br>
      auto lo<br>
      iface lo inet loopback<br>
      <br>
      auto eth6<br>
      iface eth6 inet static<br>
      address 192.168.1.41<br>
      network 192.168.1.0<br>
      netmask 255.255.255.0<br>
      gateway 192.168.1.10<br>
    </blockquote>
    <br>
    <br></div>
    So are you saying that you're attempting to give each guest the
    *same* IP address? There's no way that can possibly work, even if
    each is connected to a separate virtual network or bridge. Since the
    host's IP stack can "see" all of the guests' network traffic,
    regardless of the connection mode you choose, each must have a
    unique IP address even if they can't see each other.<div><br>
    <br>
    <br>
    <blockquote type="cite"><br>
      But each time I, for example, define the guest, it start with a
      ascending number of interface: eth6,eth7, eth8, etc, Now is
      initializing with eth12.</blockquote>
    <br></div>
    There must be a mixup in the explanation - I'm understanding that
    you put the same config file in each guest, but each guest, when it
    starts, shows a different ethernet interface in its ifconfig. That
    doesn't seem right, because none of the guests know about each
    other. Or are you saying something different? Where are you seeing
    the "eth6", "eth7", ... "eth12"? In the guest XML config maybe?<div><br>
    <br>
    <blockquote type="cite">So, it doesn't get the manual configuration I've done
      on the /etc/network/interfaces.<br>
      How can avoid this way of work of the number of ethernet interface
      the guest start?<br>
    </blockquote>
    <br></div>
    Why are you doing a manual/static definition on the guest at all?
    It's simpler to just leave the guest to automatically configure its
    eth0, and if you really want a particular IP address for a
    particular guest, handle that with a <host> element in the
    <dhcp> section of the virtual network the guest is connected
    to (or, if you're using a pure bridging setup, then in the static
    hosts config of the dhcp server on that network).<div><br>
    <br>
    <blockquote type="cite"><br>
      A way i'm trying to solve is configuring the interface trough the
      guest xml definition,</blockquote>
    <br></div>
    The guest xml interface configuration cannot be used to setup the IP
    address, route, etc config of the guest. It is only used for two
    things:<br>
    <br>
    1) configuring what kind of hardware appears on the guest (but not
    what name the guest gives to it!)<br>
    <br>
    2) configuring how that hardware is connected to the physical
    network (usually either via an existing bridge interface on the host
    (in order for the guest to appear as if its directly connected to
    the physical network), or via a "virtual network" created by libvirt
    (which is really just a bridge that's not directly connected to any
    physical interface, relying instead on the host's IP stack to route
    packets from the guest out to the physical network.)<div><br>
    <br>
    <blockquote type="cite"> but the operation "define" on virsh accepted without
      error the xml i've done, but the dumpxml doesn't show them, so, it
      doesn't work at all.<br>
      I've followed the instruction that said the manual "Application
      development guide - a guide to application development with
      libvirt" on page 71.<br>
    </blockquote>
    <br>
    <br></div>
    That document is targeted towards software developers writing
    applications to manage virtual guests using the libvirt API, not for
    system administrators who are configuring virtual guests manually
    (or, more likely, by using software that uses the libvirt API, eg
    virsh or virt-manager). It likely contains more detail and less
    overview than what you need, which is probably what led to the
    confusion. I've included a pointer to a wiki page below that is more
    the appropriate level of information (Justin, if the docs you were
    working on are somewhere easily accessible, you can point to those
    instead.)<div><br>
    <br>
    <blockquote type="cite"><br>
      The whole definition of the VM is attached, but the related to
      interface is:<br>
          <interface type='bridge'><br>
            <source bridge='br0'/><br>
            <target dev='vnet0'/><br>
          <protocol><br>
              <ip address="192.168.1.41" prefix="24"/><br>
              <route gateway="192.168.1.10"/><br>
          </protocol><br>
          <bridge stp="off" delay="0.01"><br>
          <interface type="ethernet" name="eth12"><br>
          <protocol><br>
              <ip address="192.168.1.41" prefix="24"/><br>
              <route gateway="192.168.1.10"/><br>
          </protocol><br>
          </interface><br>
          </bridge><br>
          </interface><br>
    </blockquote>
    <br>
    <br></div>
    You are confusing the guest interface config (that is part of the
    guest's XML config, and described above), and host physical
    interface config (that is not in any way associated with guest
    config, but instead used to configure the host's physical network
    interfaces, bridges, bonds, and vlan interfaces; and nearly as
    important, is not supported on Ubuntu anyway).<br>
    <br>
    Actual guest interface config is *much* simpler than that.<div><br>
    <br>
    <blockquote type="cite"><br>
      <br>
      But after define, the dumpxml only show this part:<br>
          <interface type='bridge'><br>
            <mac address='52:54:00:3c:92:9a'/><br>
            <source bridge='br0'/><br>
          </interface><br>
    </blockquote>
    <br>
    <br></div>
    That's because everything else you've put in your guest config is
    not actually a part of a valid guest interface config, and so is
    ignored.<div><br>
    <br>
    <blockquote type="cite"><br>
      <br>
      I would appreciate any help to solve the question. The problem
      I've is I lost the access to the guest every time the libvirt
      change the name of the interface eth1,2,3, etc.<br>
    </blockquote>
    <br></div>
    In this case I think it may be useful to start over. You've somehow
    been tricked into misunderstanding the way that network
    configuration in libvirt works, confusing host interface config with
    guest interface config, and the resulting config bears little
    resemblance to what would actually work.<br>
    <br>
    ==<br>
    The first step is to read this page:<br>
    <br>
       <a href="http://wiki.libvirt.org/page/Networking" target="_blank">http://wiki.libvirt.org/page/Networking</a><br>
    <br>
    to get a basic overview.<br>
    <br>
    ==<br>
    Second step: you should decide which of the three methods of
    connecting to guests to the physical network you want to use:<br>
    <br>
    1) NATed<br>
    2) routed<br>
    3) bridged<br>
    <br>
    The simplest is (1), and that will probably work just fine as long
    as 1) you don't need incoming connections to the guests, and 2)
    you're not concerned about getting the last fraction of an ounce of
    performance out of the network.<br>
    <br>
    Depending on which of those 3 you decide to use:<br>
    <br>
    ==<br>
    Third step: follow the instructions to either create a bridge
    interface on the host connected to a physical network interface (for
    (3)), or to create a libvirt virtual network using one of the two
    modes ((1) or (2) - actually the stock libvirt config already has a
    "default" network that is probably adequate for (1), and unless you
    understand IP routing very well, you'll likely want to avoid (2)).<br>
    <br>
    Once the physical network is setup:<br>
    <br>
    ==<br>
    Fourth step: define your guests. In each guest, you'll have an
    <interface> element, but it will be much simpler than what
    you've previously tried. For bridged mode, the interface section
    would look like this:<div><br>
    <br>
      <interface type='bridge'><br>
        <source bridge='br0'/><br></div>
      </interface><br>
    <br>
    Depending on the guest, you may want to specify what type of
    hardware is presented to the guest (default is rtl, which almost
    always works, but is not the best perfrorming), in particular, if
    the guest supports virtio-net, you'll want to add this into the
    <interface> element:<br>
    <br>
      <model type='virtio'/><br>
    <br>
    For NATed or routed mode, the guest's interface definition would
    look like this:<br>
    <br>
    <pre>  <interface type='network'>
     <source network='default'/>
  </interface>
</pre>
    (replace "default" with the name of the network you've defined, if
    you've defined your own). In this case also, you can add a <model
    type='...'/> if appropriate.<br>
    <br>
    Note that I don't put anything in the <interface> element
    about MAC address, target device, or bus address. Those are all
    setup automatically by libvirt the first time you start the guest,
    and it will make sure that the guests don't interfere with each
    other.<br>
    <br>
    ==<br>
    Fifth step: only if you need a particular guest to have a particular
    fixed IP address, either 1) edit the network config file on the
    guest, 2) add a static host to the libvirt virtual network
    definition (giving the MAC address provided to the guest by libvirt
    during the initial guest startup) with a <host> element added
    to the <dhcp> element of the network; details are here:<br>
    <br>
        <a href="http://www.libvirt.org/formatnetwork.html" target="_blank">http://www.libvirt.org/formatnetwork.html</a><br>
    <br>
    or 3) if you're using the bridged method to connect to the physical
    network, again either configure the guest's own config file, or add
    a static host definition to the dhcp server running on your physical
    network.<br>
    <br>
    If you still have problems don't hesitate to send another mail
    (although, as I said at the top, sending to <a href="mailto:libvirt-users@redhat.com" target="_blank">libvirt-users@redhat.com</a>
    may yield better results than <a href="mailto:libvir-list@redhat.com" target="_blank">libvir-list@redhat.com</a>).<br>
  </div>

</blockquote></div></div></div><br>
</blockquote></div><br>