Note that we attempt to remove logs only if virtlogd is in use. Otherwise we do not know the pattern for rotated files. For example for VM named "foo" we can not use "foo.log*" pattern to remove rotated logs as we can have VM named "foo.log" with log "foo.log.log". We can add extra check that filename does not end with ".log" but for VM "foo.log" we can have rotated log "foo.log.log.1". Ok let's check we don't have "log" in filename part corresponging to * but what if someone will use logrotate with "%Y.log-%m-%d" 'dateformat' option. In this case the check will exclude proper rotated files. Yes, the last example if quite artificial but it shows it is difficult to find out correctly rotated files when rotated files pattern is not known. Thus the above decision only to support case with virtlogd when we know the pattern. Another reason for not removing log files when logrotate is present is that due to races some files can escape deletion. For example foo.log.3 will be rotated to foo.log.4 after removing function will read directory files and thus foo.log.4 will not be deleted. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Libvirt API for virtualization
Libvirt provides a portable, long term stable C API for managing the virtualization technologies provided by many operating systems. It includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER Hypervisor.
For some of these hypervisors, it provides a stateful management daemon which runs on the virtualization host allowing access to the API both by non-privileged local users and remote users.
Layered packages provide bindings of the libvirt C API into other languages including Python, Perl, PHP, Go, Java, OCaml, as well as mappings into object systems such as GObject, CIM and SNMP.
Further information about the libvirt project can be found on the website:
License
The libvirt C API is distributed under the terms of GNU Lesser General Public License, version 2.1 (or later). Some parts of the code that are not part of the C library may have the more restrictive GNU General Public License, version 2.0 (or later). See the files COPYING.LESSER
and COPYING
for full license terms & conditions.
Installation
Instructions on building and installing libvirt can be found on the website:
https://libvirt.org/compiling.html
Contributing
The libvirt project welcomes contributions in many ways. For most components the best way to contribute is to send patches to the primary development mailing list. Further guidance on this can be found on the website:
https://libvirt.org/contribute.html
Contact
The libvirt project has two primary mailing lists:
- libvirt-users@redhat.com (for user discussions)
- libvir-list@redhat.com (for development only)
Further details on contacting the project are available on the website: