On 28.09.2016 13:43, Chen Hanxiao wrote:
From: Chen Hanxiao <chenhanxiao(a)gmail.com>
Add pid of VM in domain log.
We used to show this info in debug log.
For example:
If a process send SIGKILL to a qemu process,
we could find something in audit logs.
Then the pid of VM in domain log will be helpful.
Signed-off-by: Chen Hanxiao <chenhanxiao(a)gmail.com>
---
src/qemu/qemu_process.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 27d04a4..8510a89 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -5392,11 +5392,14 @@ qemuProcessLaunch(virConnectPtr conn,
_("Domain %s didn't show up"),
vm->def->name);
rv = -1;
}
- VIR_DEBUG("QEMU vm=%p name=%s running with pid=%llu",
- vm, vm->def->name, (unsigned long long)vm->pid);
+ qemuDomainLogContextWrite(logCtxt,
+ "QEMU vm=%p name=%s running with
pid=%llu\n",
+ vm,
+ vm->def->name,
+ (unsigned long long)vm->pid);
} else {
- VIR_DEBUG("QEMU vm=%p name=%s failed to spawn",
- vm, vm->def->name);
+ qemuDomainLogContextWrite(logCtxt, "QEMU vm=%p name=%s failed to
spawn",
+ vm, vm->def->name);
}
VIR_DEBUG("Writing early domain status to disk");
Can't we have both?
Michal