+++ This bug was initially created as a clone of Bug #1290357 +++
After provisioning a Beaker machine with a nightly RHEL7.3 and following this guide to deploy an OpenStack allinone setup, I couldn't instantiate a VM. Turned out the issue was a missing virtlogd process which was not started/enabled by packstack or whatever instance is responsible.
Same problem exists for Fedora (bug 1290357), and people seem to be undecided whether libvirt should enable and start virtlogd after installation or qemu.conf should be changed to not require virtlogd. Another alternative seems to be socket activation, so virtlogd starts when it's needed.
I haven't found a ticket for RHEL7, therefore I'm cloning the Fedora one here. Also I'm not sure which is the best solution and which component is ultimately responsible, so filing for libvirt is merely a wild guess (sorry if I'm wrong). But I'm quite sure that just having a customer portal entry suggesting to start and enable virtlogd to fix things up is not ideal when it comes to user experience - especially since the guide in  does not mention it.
Moving to systemd to match the upstream bug.
Presets are owned by redhat-release-* packages
I'm setting a regression keyword, since libvirt doesn't work as expected due to this bug in default setup.
Fixing this should just be a matter of adding
just like Fedora did.
Verified on redhat-release-server-7.3-6.el7. 'enable virtlogd.socket' is added to/usr/lib/systemd/system-preset/90-default.preset
My guest still can't start up due to error "Failed to connect socket to '/var/run/libvirt/virtlogd-sock'" after this fix.
Could you help to have a look? Thank you!
The steps are:
1. Install libvirt packages on host freshly
# yum install libvirt-*
2. # systemctl start libvirtd
3. # virsh start rhel7.3-0817
error: Failed to start domain rhel7.3-0817
error: Failed to connect socket to '/var/run/libvirt/virtlogd-sock': No such file or directory
4. I checked 90-default.preset file:
# tail -4 /usr/lib/systemd/system-preset/90-default.preset
# virtlog.service is sometimes used by VMs started by libvirt.service
# Enable virtlog.socket to have it socket activated
5. virtlogd.socket is inactive:
# systemctl status virtlogd.socket
● virtlogd.socket - Virtual machine log manager socket
Loaded: loaded (/usr/lib/systemd/system/virtlogd.socket; enabled; vendor preset: enabled)
Active: inactive (dead)
Listen: /var/run/libvirt/virtlogd-sock (Stream)
JinFangge, I reported bug 1372576 with issue that you described in comment 9.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.