At 04/02/2012 10:50 PM, Eric Blake Wrote:
On 04/01/2012 10:01 PM, Wen Congyang wrote:
> Currently, we use migrate to dump guest's memory. There is one
> restriction in migrate command: the device's status should be
> stored in qemu because the device's status should be passed to
> target machine.
>
> If we passthrough a host device to guest, the device's status
> is stored in the real device. So migrate command will fail.
>
> We usually use dump when guest is panicked. So there is no need
> to store device's status in the vmcore.
>
> qemu will have a new monitor command dump-guest-memory to dump
> guest memory, but it doesn't support async now(it will support
> later when the common async API is implemented).
I've seen conversation on this patch on qemu-devel, but is it actually
committed yet, or still pending there? This is late enough that it
should wait until after 0.9.11 to actually be applied, so I haven't
quite reviewed it yet.
The patch on qemu-devel is still pending there. QMP maitainer Luiz
has acked it, but he waits an ack from Jan and/or Anthony.
>
> So I use dump-guest-memory only when the guest uses host device
> in this patchset.
>
> Wen Congyang (2):
> qemu: implement qemu's dump-guest-memory
> qemu: try to use qemu's dump-guest-meory when vm uses host device
>
> src/qemu/qemu_domain.c | 1 +
> src/qemu/qemu_domain.h | 1 +
> src/qemu/qemu_driver.c | 42 ++++++++++++++++++++-
> src/qemu/qemu_monitor.c | 32 ++++++++++++++++
> src/qemu/qemu_monitor.h | 13 +++++++
> src/qemu/qemu_monitor_json.c | 42 +++++++++++++++++++++
> src/qemu/qemu_monitor_json.h | 7 ++++
> src/qemu/qemu_monitor_text.c | 83 ++++++++++++++++++++++++++++++++++++++++++
Why are we bothering with a text implementation? We know that the
feature is only present if you have qemu 1.1 or later (assuming that
qemu-devel did apply your series adding the monitor command), and
therefore we know that we have QMP, so we should only implement this for
JSON and not bother with the text monitor.
In most cases, the libvirt is built with json. But if the libvirt is built
without json, we will use text monitor.