I have a problem con libvirt, if running this python code:


import libvirt
conn = libvirt.open("vbox:///session")

return this error:

libvir: QEMU error : server closed connection
libvir: warning : Failed to find the interface: Is the daemon running ?
libvir: Remote error : unable to connect to '/var/run/libvirt/libvirt-sock': Connection refused
libvir: warning : Failed to find a node driver: Is the libvirtd daemon running ?
libvir: Remote error : unable to connect to '/var/run/libvirt/libvirt-sock': Connection refused
libvir: warning : Failed to find a secret storage driver: Is the daemon running ?

If I running the python code in sudo mode, I don't have error.

I have before add the my user at the group "libvirtd" with:

sudo adduser user libvirtd

Angelo