<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 05/07/2013 02:10 AM, Christopher
      Paggen (cpaggen) wrote:<br>
    </div>
    <blockquote
      cite="mid:2C1EC65779B43040BA3DE245544BCF91A9EB71@xmb-rcd-x09.cisco.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Howdy,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Running the most recent OVS and libvirt I’m
          running into the following error message with virt-install:<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><a moz-do-not-send="true"
            href="mailto:root@qemu-kvm:%7E/libvirt-1.0.5#">root@qemu-kvm:~/libvirt-1.0.5#</a>
          ovs-vsctl -V<o:p></o:p></p>
        <p class="MsoNormal">ovs-vsctl (Open vSwitch) 1.11.90<o:p></o:p></p>
        <p class="MsoNormal">Compiled May  6 2013 22:37:22<o:p></o:p></p>
        <p class="MsoNormal"><a moz-do-not-send="true"
            href="mailto:root@qemu-kvm:%7E/libvirt-1.0.5#">root@qemu-kvm:~/libvirt-1.0.5#</a><o:p></o:p></p>
        <p class="MsoNormal"><a moz-do-not-send="true"
            href="mailto:root@qemu-kvm:%7E/libvirt-1.0.5#">root@qemu-kvm:~/libvirt-1.0.5#</a>
          virt-install --connect qemu:///system --name DSL2 --ram 1024
          --vcpus 1 --disk path=/tmp/dsl2,size=1,bus=virtio,cache=none
          --network=bridge:br0  --vnc --os-type=linux --cdrom /dev/sr0<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Starting install...<o:p></o:p></p>
        <p class="MsoNormal">ERROR    Unable to add bridge br0 port
          vnet0: Operation not supported<o:p></o:p></p>
        <p class="MsoNormal">Domain installation does not appear to have
          been successful.<o:p></o:p></p>
        <p class="MsoNormal">If it was, you can restart your domain by
          running:<o:p></o:p></p>
        <p class="MsoNormal">  virsh --connect qemu:///system start DSL2<o:p></o:p></p>
        <p class="MsoNormal">otherwise, please restart your
          installation.<o:p></o:p></p>
        <p class="MsoNormal"><a moz-do-not-send="true"
            href="mailto:root@qemu-kvm:%7E/libvirt-1.0.5#">root@qemu-kvm:~/libvirt-1.0.5#</a>
          ovs-vsctl del-port br0 vnet0<o:p></o:p></p>
        <p class="MsoNormal"><a moz-do-not-send="true"
            href="mailto:root@qemu-kvm:%7E/libvirt-1.0.5#">root@qemu-kvm:~/libvirt-1.0.5#</a>
          libvirtd --version<o:p></o:p></p>
        <p class="MsoNormal">libvirtd (libvirt) 1.0.5<o:p></o:p></p>
        <p class="MsoNormal"><a moz-do-not-send="true"
            href="mailto:root@qemu-kvm:%7E/libvirt-1.0.5#">root@qemu-kvm:~/libvirt-1.0.5#</a>
          virsh --version<o:p></o:p></p>
        <p class="MsoNormal">1.0.5<o:p></o:p></p>
        <p class="MsoNormal"><a moz-do-not-send="true"
            href="mailto:root@qemu-kvm:%7E/libvirt-1.0.5#">root@qemu-kvm:~/libvirt-1.0.5#</a>
          virt-install --connect qemu:///system --name DSL2 --ram 1024
          --vcpus 1 --disk path=/tmp/dsl2,size=1,bus=virtio,cache=none
          --network=bridge:br0  --vnc --os-type=linux --cdrom /dev/sr0</p>
      </div>
    </blockquote>
    <br>
    There is nothing in this command line to say that the bridge is an
    openvswitch bridge, so libvirt is attempting to treat it as the
    default Linux host bridge type.<br>
    <br>
    As a matter of fact, as far as I know virt-install hasn't been
    enhanced to support direct description of an openvswitch bridge on
    its commandline.<br>
    <br>
    <br>
    The best way to solve this problem is to create a libvirt network to
    encapsulate the openvswitch bridge, then tell virt-install to use
    that network.<br>
    <br>
    1) Put the following xml into a file (e.g. /tmp/ovsnet.xml):<br>
    <br>
    <br>
        <network><br>
          <name>ovs-br0</name><br>
          <forward mode='bridge'/><br>
          <bridge name='br0'/><br>
         
    <virtualport type='openvswitch'/><br>
        </network><br>
    <br>
    2) define and start the network:<br>
    <br>
        # virsh net-define /tmp/ovsnet.xml<br>
        # virsh net-start ovs-br0<br>
        # virsh net-autostart ovs-br0<br>
    <br>
    3) run virt-install telling it to use the network "ovs-net":<br>
    <br>
        # virt-install --connect qemu:///system --name DSL2 --ram 1024
    --vcpus 1 \<br>
          --disk path=/tmp/dsl2,size=1,bus=virtio,cache=none \<br>
          --network=ovs-br0 \    <======= THIS LINE IS CHANGED.<br>
          --vnc --os-type=linux --cdrom /dev/sr0<br>
    <br>
    <br>
  </body>
</html>