Troubleshooting libvirt events errors in minion log
In earlier versions of SUSE Multi-Linux Manager (such as SUSE Multi-Linux Manager 4.3), onboarding a client with the Virtualization Host system type deployed an event listener configuration file (/etc/venv-salt-minion/minion.d/libvirt-events.conf or /etc/salt/minion.d/libvirt-events.conf).
This configuration enabled the Salt libvirt_events engine to monitor virtualization events on the host.
In later SUSE Multi-Linux Manager versions, this engine is no longer used or supported.
However, when you migrate or upgrade SUSE Multi-Linux Manager from an earlier version, this configuration file can remain on previously onboarded minions.
When the minion starts, the libvirt_events engine attempts to connect to local libvirt sockets.
The minion log file (/var/log/venv-salt-minion.log for Salt Bundle, or /var/log/salt/minion for classic Salt minion) repeatedly records error messages such as:
[salt.loaded.int.engines.libvirt_events:300 ][ERROR ] Operation not supported: Cannot use direct socket mode if no URI is set. For more information see https://libvirt.org/kbase/failed_connection_after_install.html
libvirt.libvirtError: Operation not supported: Cannot use direct socket mode if no URI is set.
or:
[salt.loaded.int.engines.libvirt_events:300 ][ERROR ] Failed to connect socket to '/var/run/libvirt/virtnetworkd-sock-ro': No such file or directory
libvirt.libvirtError: Failed to connect socket to '/var/run/libvirt/virtnetworkd-sock-ro': No such file or directory
To resolve this issue, delete the obsolete libvirt-events.conf configuration file from the affected minion and restart the minion service.
On the affected client, remove the
libvirt-events.conffile:
For Salt Bundle (
venv-salt-minion):rm /etc/venv-salt-minion/minion.d/libvirt-events.confFor classic Salt minion:
rm /etc/salt/minion.d/libvirt-events.confRestart the minion service:
For Salt Bundle (
venv-salt-minion):systemctl restart venv-salt-minionFor classic Salt minion:
systemctl restart salt-minion
Alternatively, you can remove the configuration file and restart the minion service across multiple clients by executing Salt commands on the SUSE Multi-Linux Manager Server:
Remove the file using the
file.removeexecution module:
For Salt Bundle (
venv-salt-minion):salt '<target>' file.remove /etc/venv-salt-minion/minion.d/libvirt-events.confFor classic Salt minion:
salt '<target>' file.remove /etc/salt/minion.d/libvirt-events.confRestart the minion service:
For Salt Bundle (
venv-salt-minion):salt '<target>' service.restart venv-salt-minionFor classic Salt minion:
salt '<target>' service.restart salt-minion
After you remove the configuration file and restart the minion service, the minion no longer loads the libvirt_events engine, and the error messages no longer appear in the minion log.