(2013/11/20 7:19), Andi Kleen wrote:
So I wanted to use crash to look at a dump from a qemu KVM guest I write a dump file from the qemu console with dump-guest-core foo
Hello, If you want a crash dump of the running qemu guest machine, you can use dump-guest-memory command. ETEXI { .name = "dump-guest-memory", .args_type = "paging:-p,filename:F,begin:i?,length:i?", .params = "[-p] filename [begin] [length]", .help = "dump guest memory to file" "\n\t\t\t begin(optional): the starting physical address" "\n\t\t\t length(optional): the memory size, in bytes", .mhandler.cmd = hmp_dump_guest_memory, }, STEXI @item dump-guest-memory [-p] @var{protocol} @var{begin} @var{length} @findex dump-guest-memory Dump guest memory to @var{protocol}. The file can be processed with crash or gdb. filename: dump file name paging: do paging to get guest's memory mapping begin: the starting physical address. It's optional, and should be specified with length together. length: the memory size, in bytes. It's optional, and should be specified with begin together. BTW, I heard the dump-guest-core command for the first time. According to the source code, it looks like the command to decide whether or not to include VM guest in a process core dump generated by KVM host kernel. static void qemu_ram_setup_dump(void *addr, ram_addr_t size) { int ret; /* Use MADV_DONTDUMP, if user doesn't want the guest memory in the core */ if (!qemu_opt_get_bool(qemu_get_machine_opts(), "dump-guest-core", true)) { ret = qemu_madvise(addr, size, QEMU_MADV_DONTDUMP); if (ret) { perror("qemu_madvise"); fprintf(stderr, "madvise doesn't support MADV_DONTDUMP, " "but dump_guest_core=off specified\n"); } } } According to qemu-ptions.hx, syntax of the command is: @item dump-guest-core=on|off Include guest memory in a core dump. The default is on. So, it seems strange to me that the fact "foo" file was generated... -- Thanks. HATAYAMA, Daisuke -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility