<div dir="ltr"><div><div><div>Hi,<br><br></div>I&#39;m having trouble starting a VM with vhostuser interfaces and I&#39;m not sure if it&#39;s due to my configuration of libvirt or of openvswitch.<br><br></div>I
 have a simple configuration where a VM running Debian has 1 vhostuser 
interface plugged into an OVS switch where a DPDK interface is already 
plugged in. <br></div>$ ovs-vsctl show:<br>Bridge &quot;switch1&quot;<br>    Port &quot;switch1&quot;<br>        Interface &quot;switch1&quot;<br>            type: internal<br>    Port &quot;1.switch1&quot;<br>        Interface &quot;1.switch1&quot;<br>            type: dpdk<br>            options: {dpdk-devargs=&quot;0000:0b:00.0&quot;}<br>    Port &quot;0.switch1&quot;<br>        Interface &quot;0.vm&quot;<br>            type: dpdkvhostuserclient<br>            options: {vhost-server-path=&quot;/opt/oa/<wbr>vhost/0.vm.sock&quot;}<br><br><br>The relevant excerpt from the XML of my VM is:<br><br>&lt;?xml version=&quot;1.0&quot; ?&gt;<br>&lt;domain type=&quot;kvm&quot; xmlns:ns0=&quot;<a href="http://libvirt.org/schemas/domain/qemu/1.0" target="_blank">http://libvirt.org/<wbr>schemas/domain/qemu/1.0</a>&quot;&gt;<br> &lt;!-- [...]  --&gt;<br> &lt;devices&gt;<br>    &lt;emulator&gt;/opt/oa/bin/qemu-<wbr>system-x86_64&lt;/emulator&gt;<br>    &lt;!-- [...]  --&gt;<br>    &lt;interface type=&quot;vhostuser&quot;&gt;<br>      &lt;script path=&quot;/opt/oa/etc/qemu-ifup&quot;/&gt;<br>      &lt;source mode=&quot;server&quot; path=&quot;/opt/oa/vhost/0.vm.sock&quot; type=&quot;unix&quot;/&gt;<br>      &lt;mac address=&quot;52:54:00:41:37:08&quot;/&gt;<br>      &lt;model type=&quot;virtio&quot;/&gt;<br>      &lt;driver queues=&quot;1&quot;&gt;<br>        &lt;host csum=&quot;off&quot;/&gt;<br>      &lt;/driver&gt;<br>    &lt;/interface&gt;<br>    &lt;!-- [...]  --&gt;<br>  &lt;/devices&gt;<br>  &lt;ns0:commandline&gt;<br>    &lt;ns0:arg value=&quot;-object&quot;/&gt;<br>    &lt;ns0:arg value=&quot;memory-backend-file,id=<wbr>mem,size=2G,mem-path=/dev/<wbr>hugepages,share=on&quot;/&gt;<br>    &lt;ns0:arg value=&quot;-numa&quot;/&gt;<br>    &lt;ns0:arg value=&quot;node,memdev=mem&quot;/&gt;<br>    &lt;ns0:arg value=&quot;-mem-prealloc&quot;/&gt;<br>  &lt;/ns0:commandline&gt;<br>&lt;/domain&gt;<br><br><br>Now, if I try to start my VM, I get the following error and the VM is not started at all:<br>$ virsh create vm.xml<br>error: Failed to create domain from vm.xml<br>error: unsupported configuration: scripts are not supported on interfaces of type vhostuser<br><br><br>The logs from libvirtd.log say:<br>2018-02-22
 09:18:24.982+0000: 2033: warning : qemuProcessStartWarnShmem:4539 : 
Detected vhost-user interface without any shared memory, the interface 
might not be operational<br>2018-02-22 09:18:24.982+0000: 2033: error : 
qemuBuildHostNetStr:3894 : unsupported configuration: scripts are not 
supported on interfaces of type vhostuser<br><br>The logs from qemu simply say:<br>2018-02-22 09:26:15.857+0000: shutting down, reason=failed<br><br>And finally, ovs-vswitchd.log:<br>2018-02-22T09:18:24.715Z|<wbr>00328|dpdk|INFO|VHOST_CONFIG: vhost-user client: socket created, fd: 51<br>2018-02-22T09:18:24.716Z|<wbr>00329|netdev_dpdk|INFO|vHost User device &#39;0.vm&#39; created in &#39;client&#39; mode, using client socket &#39;/opt/oa/vhost/0.vm.sock&#39;<br>2018-02-22T09:18:24.718Z|<wbr>00330|dpdk|WARN|VHOST_CONFIG: failed to connect to /opt/oa/vhost/0.vm.sock: No such file or directory<br>2018-02-22T09:18:24.718Z|<wbr>00331|dpdk|INFO|VHOST_CONFIG: /opt/oa/vhost/0.vm.sock: reconnecting...<br>2018-02-22T09:18:24.718Z|<wbr>00332|bridge|INFO|bridge switch1: added interface 0.vm on port 5<br><div><br><br></div><div>Am I missing something on the openvswitch or on the libvirt side?<br><br></div><div>It looks like openvswitch can&#39;t find /opt/oa/vhost/0.vm.sock, but isn&#39;t either openvswitch or libvirt in charge of creating it?<br></div><div>Then, I&#39;m not too sure about the error messages in libvirtd.log...</div><div><br></div><div>My software versions are: libvirt 3.10.0, qemu 2.10.2, openvswitch 2.8.1 and DPDK 17.11.<br><br></div>Thanks a lot!</div>