How to configure virtual-manager to move virt-manager.log into the another directory?


I run the virtual machines via Virtual Machine Manager 4.1.0 on Fedora 38 Workstation.

I ought to send virt-manager.log through the rsyslog service to a remote server.

But I can’t because the logfile is located in the /home/$USER/.cache/virt-manager/ directory. I’m positive that all logs must be in the /var/log/ directory.

Where could I read the info abot the virt-manager configuration?

The current directory raises that error:

rsyslogd[2517]: imfile: on startup file '/home/ilya/.cache/virt-manager/
virt-manager.log' does not exist but is configured in static file monitor -
this may indicate a misconfiguration. If the file appears at a later time,
it will automatically be processed. Reason: Permission denied [v8.2112.0].

Apps running with user privileges don’t store logs to /var/log, unless they use journald, and this is also relevant for virt-manager.

See the virt-manager manual, but keep in mind that virt-manager is just a client interface for hypervisors.

You can run the hypervisor in system mode and it will store its logs to /var/log/libvirt.

Could I set rights to the .cache directory for rsyslog?

It should run as root, so the issue is likely related to SELinux:
Troubleshooting Problems Related to SELinux :: Fedora Docs