<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif;color:rgb(11,83,148)">Solved the problem, <span style="font-size:13px">basically libvirt </span><span style="font-size:13px">pre-configures network tap devices and pre-opens /dev/vhost-net file and passes these to qemu as open, ready to use file descriptors. </span>. It makes it very difficult to use any other file descriptor for a vhost kernel module. I had to just make sure that the vhost device file descriptor was the default directory i.e., /dev/vhost-net.</div>
<div class="gmail_default" style="font-family:georgia,serif;color:rgb(11,83,148)"><br></div><div class="gmail_default" style="font-family:georgia,serif;color:rgb(11,83,148)">I also had to change the permissions for this default file descriptor and add it to "<span style="color:rgb(0,0,0);white-space:pre-wrap;font-family:arial">cgroup_device_acl".</span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 24 July 2014 16:00, Asadullah Hussain <span dir="ltr"><<a href="mailto:asadxflow@gmail.com" target="_blank">asadxflow@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif;color:rgb(11,83,148)">Currently in the VM XML, I am passing the following command line argument as a passthrough argument:</div>
<div class=""><div class="gmail_default">
<span><span style="vertical-align:baseline;white-space:pre-wrap;background-color:rgb(255,255,255)"><font face="courier new, monospace" color="#000000">-netdev type=tap,id=net1,script=no,downscript=no,ifname=port3,vhost=on </font></span></span></div>

<div class="gmail_default"><span style="vertical-align:baseline;white-space:pre-wrap;background-color:rgb(255,255,255)"><font face="courier new, monospace" color="#000000">-device virtio-net-pci,netdev=net1,mac=00:00:00:00:00:01,csum=off,gso=off,guest_tso4=off,guest_tso6=off,guest_ecn=off</font></span><br>

</div><div class="gmail_default"><span style="vertical-align:baseline;white-space:pre-wrap;background-color:rgb(255,255,255)"><font face="courier new, monospace" color="#000000"><br></font></span></div></div><div class="gmail_default">

<span style="vertical-align:baseline;background-color:rgb(255,255,255)"><font color="#0b5394" face="georgia, serif">Is there another way to represent this in the XML file? maybe that may solve the problem.</font></span></div>

</div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On 24 July 2014 15:55, Asadullah Hussain <span dir="ltr"><<a href="mailto:asadxflow@gmail.com" target="_blank">asadxflow@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif;color:rgb(11,83,148)"><br></div><div class="gmail_extra">

<br><br><div class="gmail_quote"><div>On 24 July 2014 15:52, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span> wrote:<br>
<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>On Thu, Jul 24, 2014 at 03:48:06PM +0500, Asadullah Hussain wrote:<br>



> Let me clarify my question, I am using unmodified stock qemu (1.4.0) and<br>
> only the location of vhost file descriptor is different from default (I<br>
> don't remove the default /dev/vhost-net directory)<br>
><br>
> The VHOST file descriptor is present in "/dev/vhost-0" directory instead of<br>
> the default "/dev/vhost-net". When I try to give vhostfd in the XML I get a<br>
> different error:<br>
<br>
</div>Well I suggest you make your system use the expected device<br>
name for /dev/vhost-net. Just as libvirt only targets mainline<br>
QEMU, we only target mainline kernel / standard device layout<br>
<div><div><br></div></div></blockquote></div><div class="gmail_default" style="font-family:georgia,serif;color:rgb(11,83,148)">​I was able to change my device name to /dev/vhost-net but still I get the error, the error itself isn't telling much about the problem:</div>

<div>
<div style="font-family:arial,sans-serif;font-size:13px"><font color="#0b5394" face="georgia, serif">2014-07-24 10:41:35.970+0000: 3183: error : qemuMonitorOpenUnix:293 : failed to connect to monitor socket: No such process</font></div>


<div style="font-family:arial,sans-serif;font-size:13px"><font color="#0b5394" face="georgia, serif">2014-07-24 10:41:35.970+0000: 3183: error : qemuProcessWaitForMonitor:1806 : internal error process exited while connecting to monitor: qemu-system-x86_64: -netdev type=tap,id=net1,script=no,downscript=no,ifname=port4,vhost=on: vhost-net requested but could not be initialized</font></div>


<div class="gmail_default" style="font-family:georgia,serif;color:rgb(11,83,148)"><span style="font-size:13px">qemu-system-x86_64: -netdev type=tap,id=net1,script=no,</span><span style="font-size:13px">downscript=no,ifname=port4,</span><span style="font-size:13px">vhost=on: Device 'tap' could not be initialized</span>​</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><div>
Regards,<br>
Daniel<span><font color="#888888"><br>
--<br>
|: <a href="http://berrange.com" target="_blank">http://berrange.com</a>      -o-    <a href="http://www.flickr.com/photos/dberrange/" target="_blank">http://www.flickr.com/photos/dberrange/</a> :|<br>
|: <a href="http://libvirt.org" target="_blank">http://libvirt.org</a>              -o-             <a href="http://virt-manager.org" target="_blank">http://virt-manager.org</a> :|<br>
|: <a href="http://autobuild.org" target="_blank">http://autobuild.org</a>       -o-         <a href="http://search.cpan.org/~danberr/" target="_blank">http://search.cpan.org/~danberr/</a> :|<br>
|: <a href="http://entangle-photo.org" target="_blank">http://entangle-photo.org</a>       -o-       <a href="http://live.gnome.org/gtk-vnc" target="_blank">http://live.gnome.org/gtk-vnc</a> :|<br>
</font></span></div></div></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Cheers, </div><div><br></div>Asadullah Hussain</div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr"><div>Cheers, </div><div><br></div>Asadullah Hussain</div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Cheers, </div><div><br></div>Asadullah Hussain</div>
</div>