:: Re: [DNG] Running libvirt fails und…
Top Page
Delete this message
Reply to this message
Author: wirelessduck
Date:  
CC: dng
Subject: Re: [DNG] Running libvirt fails under runit-init
On Thu, 21 Sept 2023 at 16:14, Steve Litt <slitt@???> wrote:
>
> wirelessduck--- via Dng said on Wed, 20 Sep 2023 15:40:01 +1000
>
> >I'm having trouble running virsh under runit-init.
> >
> >It was working previously under sysvinit-core, but after I install
> >runit-init and reboot I can no longer access the hypervisor.
> >
> >My user is a member of libvirt group.
> >
> >$ virsh --connect qemu:///system list --all
> >error: failed to connect to the hypervisor
> >error: internal error: Unable to get system bus connection: Could not
> >connect: No such file or directory
>
> Could you please show us your runit virsh run script, and if there are
> any other files in there like final or stop or something that sets
> environment variables, show those too.
>
> SteveT
>
> Steve Litt


Hi Steve,

Thanks for the suggestions. I don't have any runit run script for
virsh as it's just a client tool for libvirtd, and libvirtd only has a
sysvinit script.

In any case, as you can see in my reply to Bob, I solved the problem.
It was indeed a problem with environment variables in
/etc/default/libvirtd, as the /etc/init.d/libvirtd init script is by
default expecting to mount the cgroups itself, and I am already using
cgroupfs-mount for that due to docker requirements.

Setting the correct environment variable in /etc/default/libvirtd to
tell the libvirtd init script to not try and mount cgroups itself
appears to have fixed the problem.

Tom