Verified this bug with:
libvirt-daemon-7.6.0-6.1.module+el8.5.0+14474+b3410d40.x86_64
qemu-kvm-6.0.0-33.module+el8.5.0+14188+8c5ecfdd.3.x86_64
glib2-2.56.4-156.el8.x86_64
1. change the value of LimitNOFILE in /usr/lib/systemd/system/libvirtd.service
# cat /usr/lib/systemd/system/libvirtd.service
...
LimitNOFILE=100
...
2. reload the daemon
# systemctl stop libvirtd
# systemctl daemon-reload
# systemctl start libvirtd
3. prepare a guest xml
4. creating and destroy the guest repeatedly
for i in {1..1000}; do echo $i; virsh create avocado-vt-vm1.xml; virsh destroy avocado-vt-vm1; done
1
Domain 'avocado-vt-vm1' created from avocado-vt-vm1.xml
Domain 'avocado-vt-vm1' destroyed
....
999
Domain 'avocado-vt-vm1' created from avocado-vt-vm1.xml
Domain 'avocado-vt-vm1' destroyed
1000
Domain 'avocado-vt-vm1' created from avocado-vt-vm1.xml
Domain 'avocado-vt-vm1' destroyed
(No error reported)
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 (virt:av and virt-devel:av bug fix update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2022:0972