all guest vm killed during libvirtd restart if /run is not writable
Software environment
- Operating system: CentOS 7
- Architecture: x86_64
- kernel version: 5.10
- libvirt version: 4.5.0
- Hypervisor and version: QEMU 4.2
Description of problem
During libvirtd restart, it will reconnect to QEMU and update state XML. If it fails to update state XML for some reason, it will kill the QEMU process. One situation is when /run
filesystem is not writable, due to lack of memory or full filesystem. It is not expected all VMs are killed in this situation. A better behavior should be that libvirtd just quits and fails to start.
I have not tested the latest release, but the logic seems the same: https://gitlab.com/libvirt/libvirt/-/blob/v9.8.0/src/qemu/qemu_process.c#L9067
Steps to reproduce
- start some VMs
- make
/run' full:
dd if=/dev/zero of=/run/temp bs=1M` systemctl restart libvirtd