Using qemu:///session in toolbox or distrobox

I typically use user-mode libvirt for my vms. Typically, in a fedora workstation situation, I use virsh and terraform to generate my machines. But when in a toolbox container, I get this:

virsh # connect qemu:///session 
error: failed to connect to the hypervisor
error: Failed to connect socket to '/run/user/1000/libvirt/virtqemud-sock': No such file or directory

I read somewhere that the libvirt sockets were mapped into the toolbox containers, and, in fact, the system ons show up in /run/libvirt. But I can’t seem to use them either. Does anyone know how to run libvirt in a container like toolbox?

Thanks in advance…

I have done this, but it depends on libvirt being installed and running on the host and the user being in the libvirt group. The libvirt stuff is volume mounted into the toolbox session from there.

Thank you. I thought I had this covered, but I didn’t have my user within the container in the libvirt group. It worked fine one I did that. Note that the host user must also be in the libvirt group, and that can be tricky on Silverblue. I found this that helped me solve the problem: