<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi all, </div><div><br></div><div><div>When I created a virtual machine using virDomainCreateXML, with virtualport type was openvswitch, and virtual machine creation failed. The error message is:</div><div><span style="background-color: rgb(255, 204, 0);">internal error: Child process (/sbin/tc filter add dev vnet110 parent ffff: protocol all u32 match u32 0 0 police rate 0kbps burst 0kb mtu 64kb drop flowid :1) unexpected exit status 2: RTNETLINK answers: Invalid argument</span></div><div><br></div><div><span style="font-family: Arial, Helvetica, sans-serif;">The Domain XML file the </span><code class="docutils literal" style="font-weight: 700;"><interface></code><span style="font-family: Arial, Helvetica, sans-serif;"> section like this:</span></div></div><div><pre style="overflow: auto; margin-top: 0px; margin-bottom: 0px;"><span style="background-color: rgb(255, 204, 0);"><span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);"><</span>interface <span class="nb" style="background-color: rgb(255, 204, 0); color: rgb(0, 112, 32);">type</span><span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);">=</span><span class="s1" style="background-color: rgb(255, 204, 0); color: rgb(64, 112, 160);">'bridge'</span><span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);">></span>
 <span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);"><</span>mac address<span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);">=</span><span class="s1" style="background-color: rgb(255, 204, 0); color: rgb(64, 112, 160);">'52:54:00:71:b1:b6'</span><span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);">/></span>
 <span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);"><</span>source bridge<span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);">=</span><span class="s1" style="background-color: rgb(255, 204, 0); color: rgb(64, 112, 160);">'ovsbr'</span><span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);">/></span>
 <span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);"><</span>virtualport <span class="nb" style="background-color: rgb(255, 204, 0); color: rgb(0, 112, 32);">type</span><span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);">=</span><span class="s1" style="background-color: rgb(255, 204, 0); color: rgb(64, 112, 160);">'openvswitch'</span><span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);">/></span>
 <span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);"><</span>address <span class="nb" style="background-color: rgb(255, 204, 0); color: rgb(0, 112, 32);">type</span><span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);">=</span><span class="s1" style="background-color: rgb(255, 204, 0); color: rgb(64, 112, 160);">'pci'</span> domain<span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);">=</span><span class="s1" style="background-color: rgb(255, 204, 0); color: rgb(64, 112, 160);">'0x0000'</span> bus<span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);">=</span><span class="s1" style="background-color: rgb(255, 204, 0); color: rgb(64, 112, 160);">'0x00'</span> slot<span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);">=</span><span class="s1" style="background-color: rgb(255, 204, 0); color: rgb(64, 112, 160);">'0x03'</span> function<span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);">=</span><span class="s1" style="background-color: rgb(255, 204, 0); color: rgb(64, 112, 160);">'0x0'</span><span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);">/></span>
<span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);"></</span>interface<span class="o" style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);">></span></span></pre><pre style="overflow: auto; margin-top: 0px; margin-bottom: 0px;"><span style="background-color: rgb(255, 204, 0); color: rgb(102, 102, 102);"><br></span></pre><pre style="overflow: auto; margin-top: 0px; margin-bottom: 0px;">I looked at the system log and it looked like an ovs port problem:</pre><pre style="overflow: auto; margin-top: 0px; margin-bottom: 0px;"><span style="background-color: rgb(255, 204, 0);">4560 Jan 22 17:43:33 ubuntu-24 ovs-vsctl: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --if-exists del-port vnet110 -- add-port lcs_br_1 vnet110 -- set Interface vnet110 "external-     ids:attached-mac=\"52:54:00:21:63:25\"" -- set Interface vnet110 "external-ids:iface-id=\"d0e5c770-6f03-4703-b107-3b074f989b06\"" -- set Interface vnet110 "external-ids:vm-id=\"1c79066e-     46a2-4fa0-984c-a88a7fffcd2b\"" -- set Interface vnet110 external-ids:iface-status=active
4561 Jan 22 17:43:33 ubuntu-24 kernel: [29028.418651] device vnet110 entered promiscuous mode
4562 Jan 22 17:43:33 ubuntu-24 libvirtd[4307]: 2018-01-22 09:43:33.507+0000: 4310: error : virCommandWait:2572 : internal error: Child process (/sbin/tc filter add dev vnet110 parent ffff: pr     otocol all u32 match u32 0 0 police rate 0kbps burst 0kb mtu 64kb drop flowid :1) unexpected exit status 2: RTNETLINK answers: Invalid argument
4563 Jan 22 17:43:33 ubuntu-24 libvirtd[4307]: We have an error talking to the kernel
4564 Jan 22 17:43:33 ubuntu-24 kernel: [29028.454028] device vnet110 left promiscuous mode
4565 Jan 22 17:43:33 ubuntu-24 ovs-vsctl: ovs|00001|vsctl|INFO|Called as ovs-vsctl --timeout=5 -- --if-exists del-port vnet110
</span></pre><div><br></div><pre style="overflow: auto; margin-top: 0px; margin-bottom: 0px;"><br></pre><pre style="overflow: auto; margin-top: 0px; margin-bottom: 0px;"><div style="font-family: Arial; white-space: normal;">However, when I use "tc" to manage "vnet*" of an existing virtual machine, it still returns the same error.</div><div style="font-family: Arial; white-space: normal;"><div><span style="background-color: rgb(255, 204, 0);">root@ubuntu-24:~# /sbin/tc filter add dev vnet83 parent ffff: protocol all u32 match u32 0 0 police rate 0kbps burst 0kb mtu 64kb drop flowid :1</span></div><div><span style="background-color: rgb(255, 204, 0);">RTNETLINK answers: Invalid argument</span></div><div><span style="background-color: rgb(255, 204, 0);">We have an error talking to the kernel</span></div></div><div style="font-family: Arial; white-space: normal;"><span style="background-color: rgb(255, 204, 0);"><br></span></div><div style="font-family: Arial; white-space: normal;"><span style="background-color: rgb(255, 204, 0);"><br></span></div><div style="font-family: Arial; white-space: normal;">Is there any reason for this problem? Thank you very much.</div><div style="font-family: Arial; white-space: normal;"><br></div><div style="font-family: Arial; white-space: normal;"><div><pre style="width: 1076.34px;">Below some information about my machine:</pre></div><div>libvirt version: 3.4.0</div><div>ovs_version: "2.8.90"</div><div>root@ubuntu-24:~# uname -a</div><div>Linux ubuntu-24 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux</div></div></pre></div></div>