<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <br>
    <div class="moz-cite-prefix">On 3/8/2019 3:49 AM, Harsh Gondaliya
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAF6pCr4b7-8zryyAsTiQ-ZGf6g1bibon01aeST7uXGaMs56h+w@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div dir="ltr">I am trying to create a VM with its port
                attached to the OVS bridge. I have created an OVS bridge
                br0 and then followed instructions mentioned on this
                page to edit the XML file of VM: <a
                  href="http://docs.openvswitch.org/en/latest/howto/libvirt/"
                  moz-do-not-send="true">http://docs.openvswitch.org/en/latest/howto/libvirt/</a></div>
              <div dir="ltr"><br>
              </div>
              <div>I have updated my Domain XML file for the VM to
                something like this:</div>
              <div dir="ltr">
                <div dir="ltr">&lt;interface type='bridge'&gt;</div>
                <div dir="ltr">      &lt;mac
                  address='52:54:00:b1:72:f7'/&gt;</div>
                <div dir="ltr">      &lt;source bridge='br0'/&gt;</div>
                <div dir="ltr">      &lt;virtualport
                  type='openvswitch'&gt;</div>
                <div dir="ltr">        &lt;parameters
                  interfaceid='193246cd-d7b8-4bbb-8ad7-4b0b4c933004'/&gt;</div>
                <div dir="ltr">      &lt;/virtualport&gt;</div>
                <div dir="ltr">      &lt;model type='virtio'/&gt;</div>
                <div dir="ltr">      &lt;address type='pci'
                  domain='0x0000' bus='0x00' slot='0x07'
                  function='0x0'/&gt;</div>
                <div dir="ltr">    &lt;/interface&gt;</div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    This looks correct to me - I use the same on my VM's with libvirt on
    several RHEL 7 systems.  It does not seem to work with libvirt on
    Ubuntu though and I haven't tried others.<br>
    <br>
    <blockquote type="cite"
cite="mid:CAF6pCr4b7-8zryyAsTiQ-ZGf6g1bibon01aeST7uXGaMs56h+w@mail.gmail.com">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div dir="ltr">
                <div><br>
                </div>
                <div>But, as soon as I start VM using the Virtual
                  Machine Manager, I get this error: <b><i>Error
                      starting domain: internal error: Unable to add
                      port vnet0 to OVS bridge br0</i></b></div>
                <div>This explanation is given for the error:</div>
                <div>
                  <div>Traceback (most recent call last):</div>
                  <div>  File
                    "/usr/share/virt-manager/virtManager/asyncjob.py",
                    line 90, in cb_wrapper</div>
                  <div>    callback(asyncjob, *args, **kwargs)</div>
                  <div>  File
                    "/usr/share/virt-manager/virtManager/asyncjob.py",
                    line 126, in tmpcb</div>
                  <div>    callback(*args, **kwargs)</div>
                  <div>  File
                    "/usr/share/virt-manager/virtManager/libvirtobject.py",
                    line 83, in newfn</div>
                  <div>    ret = fn(self, *args, **kwargs)</div>
                  <div>  File
                    "/usr/share/virt-manager/virtManager/domain.py",
                    line 1402, in startup</div>
                  <div>    self._backend.create()</div>
                  <div>  File
                    "/usr/lib/python2.7/dist-packages/libvirt.py", line
                    1035, in create</div>
                  <div>    if ret == -1: raise libvirtError
                    ('virDomainCreate() failed', dom=self)</div>
                  <div>libvirtError: internal error: Unable to add port
                    vnet0 to OVS bridge br0</div>
                </div>
                <div><br>
                </div>
                <div>I am very new to this tool and am not able to
                  figure out what could be done to resolve this error.
                  Any help in this regard would be great.</div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    The libvirt folks will be able to help you more than we can on this
    list.<br>
    <br>
    - Greg<br>
    <br>
    <blockquote type="cite"
cite="mid:CAF6pCr4b7-8zryyAsTiQ-ZGf6g1bibon01aeST7uXGaMs56h+w@mail.gmail.com">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div dir="ltr">
                <div><br>
                </div>
                <div>Regards,</div>
                <div>Harsh</div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:discuss@openvswitch.org">discuss@openvswitch.org</a>
<a class="moz-txt-link-freetext" href="https://mail.openvswitch.org/mailman/listinfo/ovs-discuss">https://mail.openvswitch.org/mailman/listinfo/ovs-discuss</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>