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.
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.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org