Hi all,<div><br></div><div>I am trying to add vagrant-libvirt support for landrush plugin[0] and found out that libvirt fails for me with:</div><div><br></div><div><br></div><div>Call to virConnectNumOfNetworks failed: Cannot write data: Broken pipe (Libvirt::RetrieveError)</div><div><br></div><div>I created a minimal reproducer that causes this:</div><div><br></div><div>```</div><div>#!/usr/bin/ruby</div><div><div>require 'libvirt'</div><div><br></div><div>conn = Libvirt::open("qemu:///system")</div><div><br></div><div>fork do</div><div>  puts conn.list_networks</div><div>end</div><div><br></div><div>puts conn.list_networks</div></div><div>```</div><div><br></div><div>This works just fine on my host, but fails on my virtualized guest (when using nested KVM). The journal shows</div><div>the following lines in logs:</div><div><br></div><div>Failed to acquire pid file '/run/user/1001/libvirt/libvirtd.pid': Resource temporarily unavailable</div><div><br></div><div>So the forked process here tries to access not-existing libvirtd pid file for root (1001 on the VM).</div><div><br></div><div>Is this a feature/bug? How can one avoid it?</div><div><br></div><div>Thanks everyone</div><div>Josef</div><div><br></div><div><br></div><div>[0] <a href="https://github.com/phinze/landrush/pull/124">https://github.com/phinze/landrush/pull/124</a></div>