Hi, Dear all
        I have a question, and need your help. 
  I want to output some log message to "/var/log/libvirt/qemu/instance-xxxxxx" 
when guest kernel crashed, so I add following the code:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

static int
qemuProcessHandleGuestPanic(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                            virDomainObjPtr vm,
                            void *opaque)
{
......
+    qemuDomainLogContextPtr logCtxt = NULL;

+    if (!(logCtxt = qemuDomainLogContextNew(driver, vm, 
QEMU_DOMAIN_LOG_CONTEXT_MODE_START))){
+        VIR_WARN("Unable to open domainlog");
+        goto cleanup;
+    }

......
}

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

But this code cannot get the logCtxt,   
logCtxt = qemuDomainLogContextNew(driver, vm, 
QEMU_DOMAIN_LOG_CONTEXT_MODE_START)  always return NULL, so I CANNOT write 
message to log file.

Really Need your help, Thanks!

Thanks
Feng


--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to