<div dir="ltr">Hi,<div> <div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div dir="ltr"><div>I know that previous versions of opennebula required openvswitch-brcompat </div><div><br></div><div>>> <a href="http://opennebula.org/documentation:rel3.8:openvswitch#hosts_configuration" target="_blank">http://opennebula.org/documentation:rel3.8:openvswitch#hosts_configuration</a></div>



<div><br></div><div>but the 4.0 docs seem to indicate that with KVM brcompat is not required:</div><div><br></div><div>>> <a href="http://opennebula.org/documentation:rel4.0:openvswitch#ovswitch_and_ovswitch_brcompat" target="_blank">http://opennebula.org/documentation:rel4.0:openvswitch#ovswitch_and_ovswitch_brcompat</a></div>



<div><br></div><div>Anyway, I did install the openvswitch-brcompat package, but got the same error.</div><div>(looking at the docs now, it seems that you have to tell the OpenNebula to use a different openvswitch driver, </div>



<div>specifically openvswitch_brcompat, so I think this test may have been incomplete)</div><div><br></div></div></blockquote><div><br></div><div>Yes, brcompat is now no longer required, and we recommend that if you're using kvm/libvirt you shouldn't enable the brcompat module</div>


<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>
</div><div>Then I attempted to run the ovs command at the command line, when I do so, I get the following error:</div>
<div><br></div><div>>> root@loki:~# sudo /usr/bin/ovs-ofctl add-flow ovsbr0 in_port=,dl_src=02:00:44:47:83:44,priority=40000,actions=normal</div><div>>> ovs-ofctl: dl_src=02:00:44:47:83:44: bad syntax for in_port</div>



<div><br></div><div>I think this might be the root cause of the issue?  Where is "in_port" defined?  </div><div>I don't see it in the onevnet template, but that doesn't mean I didn't just miss it.</div>


</div></blockquote><div><br></div><div>Exactly, that's the root cause, the in_port is not being found correctly. I propose you do this to figure things out:</div><div><br></div><div>1) (in the worker node i.e. 'loki') disable /var/lib/one/remotes/vnm/ovswitch/post by adding exit 0 at line 2 of that script</div>


<div>2) launch the virtual machine, it should get to running</div><div style>3) do virsh dumpxml one-<vmid></div><div style>4) this bit of code should be able to extract the tap interface from the previous output:</div>

<div style><a href="https://github.com/OpenNebula/one/blob/master/src/vnm_mad/remotes/OpenNebulaNic.rb#L59">https://github.com/OpenNebula/one/blob/master/src/vnm_mad/remotes/OpenNebulaNic.rb#L59</a> (get_tap for the NicKVM class)<br>

</div><div style>can you try so manually extracting that bit of code and providing the info it needs see if it's working correctly?</div><div style>Otherwise, you can figure it out manually, we're looking for something like vnetX (let's call that <vnet>)</div>

<div style>5) finally, do</div><div style>$ sudo ovs_ofctl dump-ports ovsbr0 <vnet></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr"><div>But this seems less than ideal.  Also, I think the incorrect syntax is the root cause of the issue, if there are other issues.</div></div></blockquote><div><br></div><div style>We recommend doing it like this:</div>

<div>oneadmin    ALL=(ALL) NOPASSWD: /usr/bin/ovs-ofctl</div><div><br></div><div style>cheers,<br>Jaime</div></div><div><br></div>-- <br>Jaime Melis<br>Project Engineer<br>OpenNebula - The Open Source Toolkit for Cloud Computing<br>

<a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:jmelis@opennebula.org" target="_blank">jmelis@opennebula.org</a>
</div></div></div>