After upgrading to app-emulation/libvirt-1.3.0, all attempts to start a virtual machine (aka "domain") fail with the following error message: virsh start FOO error: Failed to start domain FOO error: socket creation to '/var/run/libvirt/virtlogd-sock' failed: file or directory not found The reason is described here: https://bugzilla.redhat.com/show_bug.cgi?id=1290357 Comment #2 "libvirt 1.3.0 added a new mandatory service, virtlogd. so you'll need to enable that with service/systemctl first." Solution: start service virtlogd before starting the first virtual machine / domain. I propose to add a dependency into the libvirtd init file like "need virtlogd" (and similar for systemd" - or at least add a hint in "pkg_postinst" to remind the user starting virtlogd
> Solution: start service virtlogd before starting the first virtual machine / > domain. Just to clarify: Starting virtlogd in addition to the libvirtd service resolved the issue? Thinks to do: [ ] Update openrc runscript @Cardoe: I suggest we change the "use" dependency from virtlockd to a "need" dependency for virtlockd and virtlogd [ ] Provide an update message in gentoo.readme: For systemd users it is necessary to enable the libvirtd.service unit again to also enable virtlogd.socket: # systemctl enable libvirtd.service
(In reply to Matthias Maier from comment #1) > > Just to clarify: Starting virtlogd in addition to the libvirtd service > resolved the issue? > Yes, exactly.
(In reply to Matthias Maier from comment #1) > > Solution: start service virtlogd before starting the first virtual machine / > @Cardoe: I suggest we change the "use" dependency from virtlockd to a > "need" > dependency for virtlockd and virtlogd And just to clarify from my side: I did not say that virtlockd is NEEDED, only virtlogd is NEEDED. I did not notice virtlockd before today, it is not running on my notebook and so I assume it is not required (or NEEDED) to run domains with libvirtd. I think it is optional, and don't know in which way it is recommended for everyone using libvirtd.
Proposed fix plus some other updates.
I should note I didn't touch the systemd bits.
@cardoe: There is nothing to adjust in the systemd service files. (We ship the ones provided by upstream and they do the right thing™) Thanks a lot for the patches and the maintenance bits. I've applied the commit from your branch. I leave the bug open as a reminder that I should have a look at the systemd bits (whether virtlogd.socket is activated automatigally or needs user intervention). commit c5f6db512e407f2957eb68a6801edcc555db4ac8 Author: Doug Goldstein <cardoe@gentoo.org> Commit: Matthias Maier <tamiko@gentoo.org> app-emulation/libvirt: fix up service dependencies libvirtd requires virtlogd so this adds it as a 'need'. Change the other services to be on their own line to be a bit more clear in the future. Change failure to start due to missing directories into a test and create rather than failure. Gentoo-Bug: 571084 Package-Manager: portage-2.2.26 Signed-off-by: Doug Goldstein <cardoe@gentoo.org> Signed-off-by: Matthias Maier <tamiko@gentoo.org>