mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 07:05:28 +00:00
qemu_process: show shutoff reasons when debug log disabled
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>
This commit is contained in:
parent
0467ab3ff4
commit
5853ea85dc
@ -5810,7 +5810,9 @@ void qemuProcessStop(virQEMUDriverPtr driver,
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user