<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi Suresh,</p>
    <p><br>
    </p>
    <p>1) I guess for virtual network do you mean type as "network"
      instead "direct"?</p>
    <p>     virtual network(type=direct) <br>
    </p>
    <p>2) Just to be clear the network xml example given by you are not
      for libvirt network xml instead interface xml used in domain xml.<br>
    </p>
    <p>3) Just to addon example of interface xml for virtual
      network(type=network) (current implementation).</p>
    <table class="highlight tab-size js-file-line-container"
      data-tab-size="8">
      <tbody>
        <tr>
          <td id="LC28" class="blob-code blob-code-inner js-file-line"><span
              class="pl-s"> &lt;interface type='network' name='ethX'&gt;</span></td>
        </tr>
        <tr>
        </tr>
      </tbody>
    </table>
    <table class="highlight tab-size js-file-line-container"
      data-tab-size="8">
      <tbody>
        <tr>
          <td id="LC29" class="blob-code blob-code-inner js-file-line"><span
              class="pl-s"> &lt;start mode='onboot'/&gt;</span></td>
        </tr>
        <tr>
        </tr>
      </tbody>
    </table>
    <table class="highlight tab-size js-file-line-container"
      data-tab-size="8">
      <tbody>
        <tr>
          <td id="LC30" class="blob-code blob-code-inner js-file-line"><span
              class="pl-s"> &lt;source network='default'/&gt;</span></td>
        </tr>
        <tr>
        </tr>
      </tbody>
    </table>
    <table class="highlight tab-size js-file-line-container"
      data-tab-size="8">
      <tbody>
        <tr>
          <td id="LC31" class="blob-code blob-code-inner js-file-line"><span
              class="pl-s"> &lt;model type='virtio'/&gt;</span></td>
        </tr>
        <tr>
        </tr>
      </tbody>
    </table>
    <span class="pl-s"> &lt;/interface&gt;</span>
    <p>Thanks,</p>
    <p>Archana Singh<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 08/09/2016 02:42 PM, Suresh Babu
      Angadi wrote:<br>
    </div>
    <blockquote cite="mid:57A99E86.80504@linux.vnet.ibm.com" type="cite">Hi
      All,
      <br>
      To support, attaching a physical interface to guest as macvtap or
      attaching ovs bridge to guest without creating libvirt network, I
      propose following changes to 'networks' attribute of templates
      josn.
      <br>
      <br>
      current implementation:
      <br>
      'networks' attribute expects list of virtual network names
      <br>
      <br>
      changes:
      <br>
      'networks': list of dictionary
      <br>
                      type: can be direct, network or bridge
      <br>
                      interface: name of physical interface(type=direct)
      or ovs (type=bridge) or virtual network(type=direc<br>
                      mode(required if type=direct): bridge or vepa
      <br>
      <br>
      for macvtap: type is direct and mode can be bridge or vepa
      <br>
      for ovs: type is bridge and mode is not required
      <br>
      for virtual network: type=network(current implementation)
      <br>
      <br>
      Examples of network xml for attaching macvtap and ovs to guest
      without libvirt:
      <br>
      OVS:
      <br>
      &lt;interface type="bridge"&gt;
      <br>
        &lt;source bridge="vswitch0"/&gt;
      <br>
        &lt;virtualport type="openvswitch"/&gt;
      <br>
        &lt;model type="virtio"/&gt;
      <br>
      &lt;/interface&gt;
      <br>
      <br>
      macvtap with bridge mode:
      <br>
      &lt;interface type="direct"&gt;
      <br>
        &lt;source dev="eth0" mode="bridge"/&gt;
      <br>
        &lt;model type="virtio"/&gt;
      <br>
      &lt;/interface&gt;
      <br>
      <br>
       macvtap with vepa mode:
      <br>
      &lt;interface type="direct"&gt;
      <br>
        &lt;source dev="bond0" mode="vepa"/&gt;
      <br>
        &lt;model type="virtio"/&gt;
      <br>
      &lt;/interface&gt;
      <br>
      <br>
    </blockquote>
    <br>
  </body>
</html>