We have a few of senarios that libvirtd would invoke qemuProcessStop
and leave a "shutting down" in /var/log/libvirt/qemu/$DOMAIN.log.
The shutoff reason showing in debug log is also very important
for us to know why VM shutting down in domain log,
as we seldom enable debug log of libvirtd.
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
virDomainObjBroadcast(vm);
if ((timestamp = virTimeStringNow()) != NULL) {
- qemuDomainLogAppendMessage(driver, vm, "%s: shutting down\n", timestamp);
+ qemuDomainLogAppendMessage(driver, vm, "%s: shutting down, reason=%s\n",
+ timestamp,
+ virDomainShutoffReasonTypeToString(reason));
VIR_FREE(timestamp);
}