Open Wenzel opened 4 years ago
This QEMU, matching KVM with KVMI-v6 patches, doesn't send the name, nor the VM start time (padding2). see
I've only changed the handshake structure to match KVMI-v6 :(
kvmi_introspector2qemu.cookie is what the introspection app sets, if the guest is configured to authenticate the app. So, it should be empty when that callback is called.
On KVMi-v7
the name
is set now.
The VM start time is still empty though
kvmi-test.c shows both fields as non-empty.
@adlazar my bad, it is my translation to a string date that seem to be incorrect.
--KVMi handshake:
-- VM name: winxp
-- VM start time: 2159253
-- VM start time: Sun Jan 25 1970
but as I got the same date than on my last attempt, i figured the timestamp was empty and therefore starting at 1970.
this is how I translated
char date[64] = {'\0'};
const char *format = "%a %b %d %Y";
struct tm *tm = NULL;
tm = localtime(&qemu->start_time);
if (strftime(date, sizeof(date), format, tm) <= 0) {
errprint("Failed to convert time to string\n");
} else {
dbprint(VMI_DEBUG_KVM, "-- VM start time: %s\n", date);
}
https://github.com/KVM-VMI/qemu/pull/5/commits/58840c5bbc82005422d997175b7f94df24fa28da fixes the VM start time issue.
Hi,
I would like to print the available information in the KVMi handshake callback:
However some of the fields are empty:
cc @adlazar, @mdontu is this not implemented yet ?