[libvirt] [PATCH] implement virsh dump for qemu guests

This patch uses a "migrate"+"cont" combination to implement "virsh dump" for QEMU guests (BZ507551). The code is mostly based on qemudDomainSave, except that the XML prolog is not included as it is not needed to examine the dump with e.g. crash. 2009-07-08 Paolo Bonzini <bonzini@gnu.org> * qemu_driver.c (qemudDomainCoreDump): New. (qemuDriver): Add core dump function. --- src/qemu_driver.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 84 insertions(+), 1 deletions(-) diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 95ea882..546a691 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -2844,6 +2844,89 @@ cleanup: } +static int qemudDomainCoreDump(virDomainPtr dom, + const char *path, + int flags ATTRIBUTE_UNUSED) { + struct qemud_driver *driver = dom->conn->privateData; + virDomainObjPtr vm; + char *command = NULL; + char *info = NULL; + char *safe_path = NULL; + int ret = -1; + + qemuDriverLock(driver); + vm = virDomainFindByUUID(&driver->domains, dom->uuid); + + if (!vm) { + char uuidstr[VIR_UUID_STRING_BUFLEN]; + virUUIDFormat(dom->uuid, uuidstr); + qemudReportError(dom->conn, dom, NULL, VIR_ERR_NO_DOMAIN, + _("no domain with matching uuid '%s'"), uuidstr); + goto cleanup; + } + + if (!virDomainIsActive(vm)) { + qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_INVALID, + "%s", _("domain is not running")); + goto cleanup; + } + + /* Migrate to file */ + safe_path = qemudEscapeShellArg(path); + if (!safe_path) { + virReportOOMError(dom->conn); + goto cleanup; + } + if (virAsprintf(&command, "migrate \"exec:" + "dd of='%s' 2>/dev/null" + "\"", safe_path) == -1) { + virReportOOMError(dom->conn); + command = NULL; + goto cleanup; + } + + if (qemudMonitorCommand(vm, command, &info) < 0) { + qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, + "%s", _("migrate operation failed")); + goto cleanup; + } + + DEBUG ("%s: migrate reply: %s", vm->def->name, info); + + /* If the command isn't supported then qemu prints: + * unknown command: migrate" */ + if (strstr(info, "unknown command:")) { + qemudReportError (dom->conn, dom, NULL, VIR_ERR_NO_SUPPORT, + "%s", + _("'migrate' not supported by this qemu")); + goto cleanup; + } + + /* Migrate always stops the VM. However, since the monitor is always + attached to a pty for libvirt, it will support synchronous + operations so we get here just after the end of the migration. */ + if (vm->state == VIR_DOMAIN_RUNNING) { + if (qemudMonitorCommand(vm, "cont", &info) < 0) { + qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, + "%s", _("continue operation failed")); + goto cleanup; + } + DEBUG("Reply %s", info); + VIR_FREE(info); + } + ret = 0; + +cleanup: + VIR_FREE(safe_path); + VIR_FREE(command); + VIR_FREE(info); + if (vm) + virDomainObjUnlock(vm); + qemuDriverUnlock(driver); + return ret; +} + + static int qemudDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus) { struct qemud_driver *driver = dom->conn->privateData; virDomainObjPtr vm; @@ -5310,7 +5393,7 @@ static virDriver qemuDriver = { qemudDomainGetInfo, /* domainGetInfo */ qemudDomainSave, /* domainSave */ qemudDomainRestore, /* domainRestore */ - NULL, /* domainCoreDump */ + qemudDomainCoreDump, /* domainCoreDump */ qemudDomainSetVcpus, /* domainSetVcpus */ #if HAVE_SCHED_GETAFFINITY qemudDomainPinVcpu, /* domainPinVcpu */ -- 1.6.2.5

On Thu, Jul 09, 2009 at 07:24:11PM +0200, Paolo Bonzini wrote:
This patch uses a "migrate"+"cont" combination to implement "virsh dump" for QEMU guests (BZ507551).
The code is mostly based on qemudDomainSave, except that the XML prolog is not included as it is not needed to examine the dump with e.g. crash.
Does crash actually understand the QEMU migrate data format ? I'm rather (pleasantly) surprised if it does ...
2009-07-08 Paolo Bonzini <bonzini@gnu.org>
* qemu_driver.c (qemudDomainCoreDump): New. (qemuDriver): Add core dump function. --- src/qemu_driver.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 84 insertions(+), 1 deletions(-)
diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 95ea882..546a691 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -2844,6 +2844,89 @@ cleanup: }
+static int qemudDomainCoreDump(virDomainPtr dom, + const char *path, + int flags ATTRIBUTE_UNUSED) { + struct qemud_driver *driver = dom->conn->privateData; + virDomainObjPtr vm; + char *command = NULL; + char *info = NULL; + char *safe_path = NULL; + int ret = -1; + + qemuDriverLock(driver); + vm = virDomainFindByUUID(&driver->domains, dom->uuid);
Since you don't touch 'driver' again after this point you can safely unlock it right here. This avoids blocking the whole QEMU driver while the dump is taking place
+ + if (!vm) { + char uuidstr[VIR_UUID_STRING_BUFLEN]; + virUUIDFormat(dom->uuid, uuidstr); + qemudReportError(dom->conn, dom, NULL, VIR_ERR_NO_DOMAIN, + _("no domain with matching uuid '%s'"), uuidstr); + goto cleanup; + } + + if (!virDomainIsActive(vm)) { + qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_INVALID, + "%s", _("domain is not running")); + goto cleanup; + } + + /* Migrate to file */ + safe_path = qemudEscapeShellArg(path); + if (!safe_path) { + virReportOOMError(dom->conn); + goto cleanup; + } + if (virAsprintf(&command, "migrate \"exec:" + "dd of='%s' 2>/dev/null" + "\"", safe_path) == -1) { + virReportOOMError(dom->conn); + command = NULL; + goto cleanup; + } + + if (qemudMonitorCommand(vm, command, &info) < 0) { + qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, + "%s", _("migrate operation failed")); + goto cleanup; + } + + DEBUG ("%s: migrate reply: %s", vm->def->name, info); + + /* If the command isn't supported then qemu prints: + * unknown command: migrate" */ + if (strstr(info, "unknown command:")) { + qemudReportError (dom->conn, dom, NULL, VIR_ERR_NO_SUPPORT, + "%s", + _("'migrate' not supported by this qemu")); + goto cleanup; + } + + /* Migrate always stops the VM. However, since the monitor is always + attached to a pty for libvirt, it will support synchronous + operations so we get here just after the end of the migration. */ + if (vm->state == VIR_DOMAIN_RUNNING) { + if (qemudMonitorCommand(vm, "cont", &info) < 0) { + qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, + "%s", _("continue operation failed")); + goto cleanup; + } + DEBUG("Reply %s", info); + VIR_FREE(info); + } + ret = 0; + +cleanup: + VIR_FREE(safe_path); + VIR_FREE(command); + VIR_FREE(info); + if (vm) + virDomainObjUnlock(vm); + qemuDriverUnlock(driver); + return ret; +} + + static int qemudDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus) { struct qemud_driver *driver = dom->conn->privateData; virDomainObjPtr vm; @@ -5310,7 +5393,7 @@ static virDriver qemuDriver = { qemudDomainGetInfo, /* domainGetInfo */ qemudDomainSave, /* domainSave */ qemudDomainRestore, /* domainRestore */ - NULL, /* domainCoreDump */ + qemudDomainCoreDump, /* domainCoreDump */ qemudDomainSetVcpus, /* domainSetVcpus */ #if HAVE_SCHED_GETAFFINITY qemudDomainPinVcpu, /* domainPinVcpu */
ACK, only a minor locking optimization needed Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On 07/09/2009 11:36 PM, Daniel P. Berrange wrote:
Does crash actually understand the QEMU migrate data format ? I'm rather (pleasantly) surprised if it does ...
Dave Anderson is working on it (I gave him a prototype parser and he's integrating it into crash, that's why last week I was working on the QEMU file format). It's not going to make it into RHEL 5.4 of course. Paolo

This patch uses a "migrate"+"cont" combination to implement "virsh dump" for QEMU guests (BZ507551). The code is mostly based on qemudDomainSave, except that the XML prolog is not included as it is not needed to examine the dump with e.g. crash. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Daniel P. Berrange <berrange@redhat.com> 2009-07-08 Paolo Bonzini <bonzini@gnu.org> * qemu_driver.c (qemudDomainCoreDump): New. (qemuDriver): Add core dump function. --- The only change from v1 is moving the unlocking up. src/qemu_driver.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 84 insertions(+), 1 deletions(-) diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 95ea882..3e6d639 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -2844,6 +2844,89 @@ cleanup: } +static int qemudDomainCoreDump(virDomainPtr dom, + const char *path, + int flags ATTRIBUTE_UNUSED) { + struct qemud_driver *driver = dom->conn->privateData; + virDomainObjPtr vm; + char *command = NULL; + char *info = NULL; + char *safe_path = NULL; + int ret = -1; + + qemuDriverLock(driver); + vm = virDomainFindByUUID(&driver->domains, dom->uuid); + qemuDriverUnlock(driver); + + if (!vm) { + char uuidstr[VIR_UUID_STRING_BUFLEN]; + virUUIDFormat(dom->uuid, uuidstr); + qemudReportError(dom->conn, dom, NULL, VIR_ERR_NO_DOMAIN, + _("no domain with matching uuid '%s'"), uuidstr); + goto cleanup; + } + + if (!virDomainIsActive(vm)) { + qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_INVALID, + "%s", _("domain is not running")); + goto cleanup; + } + + /* Migrate to file */ + safe_path = qemudEscapeShellArg(path); + if (!safe_path) { + virReportOOMError(dom->conn); + goto cleanup; + } + if (virAsprintf(&command, "migrate \"exec:" + "dd of='%s' 2>/dev/null" + "\"", safe_path) == -1) { + virReportOOMError(dom->conn); + command = NULL; + goto cleanup; + } + + if (qemudMonitorCommand(vm, command, &info) < 0) { + qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, + "%s", _("migrate operation failed")); + goto cleanup; + } + + DEBUG ("%s: migrate reply: %s", vm->def->name, info); + + /* If the command isn't supported then qemu prints: + * unknown command: migrate" */ + if (strstr(info, "unknown command:")) { + qemudReportError (dom->conn, dom, NULL, VIR_ERR_NO_SUPPORT, + "%s", + _("'migrate' not supported by this qemu")); + goto cleanup; + } + + /* Migrate always stops the VM. However, since the monitor is always + attached to a pty for libvirt, it will support synchronous + operations so we get here just after the end of the migration. */ + if (vm->state == VIR_DOMAIN_RUNNING) { + if (qemudMonitorCommand(vm, "cont", &info) < 0) { + qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, + "%s", _("continue operation failed")); + goto cleanup; + } + DEBUG("Reply %s", info); + VIR_FREE(info); + } + ret = 0; + +cleanup: + VIR_FREE(safe_path); + VIR_FREE(command); + VIR_FREE(info); + if (vm) + virDomainObjUnlock(vm); + return ret; +} + + static int qemudDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus) { struct qemud_driver *driver = dom->conn->privateData; virDomainObjPtr vm; @@ -5310,7 +5393,7 @@ static virDriver qemuDriver = { qemudDomainGetInfo, /* domainGetInfo */ qemudDomainSave, /* domainSave */ qemudDomainRestore, /* domainRestore */ - NULL, /* domainCoreDump */ + qemudDomainCoreDump, /* domainCoreDump */ qemudDomainSetVcpus, /* domainSetVcpus */ #if HAVE_SCHED_GETAFFINITY qemudDomainPinVcpu, /* domainPinVcpu */ -- 1.6.2.5

On Fri, Jul 10, 2009 at 12:03:26AM +0200, Paolo Bonzini wrote:
This patch uses a "migrate"+"cont" combination to implement "virsh dump" for QEMU guests (BZ507551).
The code is mostly based on qemudDomainSave, except that the XML prolog is not included as it is not needed to examine the dump with e.g. crash.
+ if (virAsprintf(&command, "migrate \"exec:" + "dd of='%s' 2>/dev/null" + "\"", safe_path) == -1) { + virReportOOMError(dom->conn); + command = NULL; + goto cleanup; + } + + if (qemudMonitorCommand(vm, command, &info) < 0) { + qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, + "%s", _("migrate operation failed")); + goto cleanup; + } + + DEBUG ("%s: migrate reply: %s", vm->def->name, info); + + /* If the command isn't supported then qemu prints: + * unknown command: migrate" */ + if (strstr(info, "unknown command:")) { + qemudReportError (dom->conn, dom, NULL, VIR_ERR_NO_SUPPORT, + "%s", + _("'migrate' not supported by this qemu")); + goto cleanup; + } + + /* Migrate always stops the VM. However, since the monitor is always + attached to a pty for libvirt, it will support synchronous + operations so we get here just after the end of the migration. */ + if (vm->state == VIR_DOMAIN_RUNNING) { + if (qemudMonitorCommand(vm, "cont", &info) < 0) { + qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, + "%s", _("continue operation failed")); + goto cleanup; + } + DEBUG("Reply %s", info); + VIR_FREE(info); + }
On second review, this does not look correct. The VM continues to run normally throughout any 'migrate' operation and is never stopped, as this is the whole point of 'live' migration. The semantics of virDomainDumpCore (as defined by the current & only impl in the Xen driver), as that the core dump operation should be non-live. So you should in fact issue a 'stop' command to the monitor before doing the migration. Then, the 'cont' command after migrate would indeed make sense. We have a currently unused, 'flags' parameter for virDomainDumpCore. We should make use of this flag by defining VIR_DOMAIN_DUMP_CORE_LIVE = 1 and then allow for use of this flag in both Xen and KVM to do a fully live core dump without pausing. NB, this might complicate the crash analysis of course... Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On 07/10/2009 11:26 AM, Daniel P. Berrange wrote:
On second review, this does not look correct. The VM continues to run normally throughout any 'migrate' operation and is never stopped, as this is the whole point of 'live' migration.
The reason for the 'cont' command is that the migrate operation always stops the VM at the end of the migration. So the cont command is always necessary.
The semantics of virDomainDumpCore (as defined by the current& only impl in the Xen driver), as that the core dump operation should be non-live.
Actually that was done on purpose. Should I prepare a v3 doing a stop before the migration, and then work out how to implement the flag? Paolo

On Fri, Jul 10, 2009 at 11:30:23AM +0200, Paolo Bonzini wrote:
On 07/10/2009 11:26 AM, Daniel P. Berrange wrote:
On second review, this does not look correct. The VM continues to run normally throughout any 'migrate' operation and is never stopped, as this is the whole point of 'live' migration.
The reason for the 'cont' command is that the migrate operation always stops the VM at the end of the migration. So the cont command is always necessary.
Oh, i see what you mean.
The semantics of virDomainDumpCore (as defined by the current& only impl in the Xen driver), as that the core dump operation should be non-live.
Actually that was done on purpose. Should I prepare a v3 doing a stop before the migration, and then work out how to implement the flag?
Yeah, lets just add the explicit 'stop' command before doing the migrate. And then make live/non-live a flag in a subsequent patch Dnaiel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Daniel P. Berrange wrote:
On Fri, Jul 10, 2009 at 11:30:23AM +0200, Paolo Bonzini wrote:
On 07/10/2009 11:26 AM, Daniel P. Berrange wrote:
On second review, this does not look correct. The VM continues to run normally throughout any 'migrate' operation and is never stopped, as this is the whole point of 'live' migration. The reason for the 'cont' command is that the migrate operation always stops the VM at the end of the migration. So the cont command is always necessary.
Oh, i see what you mean.
The semantics of virDomainDumpCore (as defined by the current& only impl in the Xen driver), as that the core dump operation should be non-live. Actually that was done on purpose. Should I prepare a v3 doing a stop before the migration, and then work out how to implement the flag?
Yeah, lets just add the explicit 'stop' command before doing the migrate. And then make live/non-live a flag in a subsequent patch
Yeah, we should do this. You can also go further; xm allows you to either do live or non-live core-dump, and also to crash or not crash the domain after the dump. While non-live, crashing dump is by far the most useful (and hence should be the default), the other 3 modes do have their place as well. -- Chris Lalancette

This patch uses a stop/migrate/cont combination to implement "virsh dump" for QEMU guests (BZ507551). The code is mostly based on qemudDomainSave, except that the XML prolog is not included as it is not needed to examine the dump with e.g. crash. The plan is to implement live dumping in the future. When that is done, it shouldn't require reindentation. This plan is also the reason for the "weird" resume = (vm->state == VIR_DOMAIN_RUNNING); if (vm->state == VIR_DOMAIN_RUNNING) { ... } * src/qemu_driver.c (qemudDomainCoreDump): New. (qemuDriver): Add core dump function. --- The virsh dump for xen does not crash the VM, and so does this KVM implementation. src/qemu_driver.c | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 103 insertions(+), 1 deletions(-) diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 3b2c167..43f93c5 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -2845,6 +2845,108 @@ cleanup: } +static int qemudDomainCoreDump(virDomainPtr dom, + const char *path, + int flags ATTRIBUTE_UNUSED) { + struct qemud_driver *driver = dom->conn->privateData; + virDomainObjPtr vm; + char *command = NULL; + char *info = NULL; + char *safe_path = NULL; + int resume = 0, paused = 0; + int ret = -1; + + qemuDriverLock(driver); + vm = virDomainFindByUUID(&driver->domains, dom->uuid); + qemuDriverUnlock(driver); + + if (!vm) { + char uuidstr[VIR_UUID_STRING_BUFLEN]; + virUUIDFormat(dom->uuid, uuidstr); + qemudReportError(dom->conn, dom, NULL, VIR_ERR_NO_DOMAIN, + _("no domain with matching uuid '%s'"), uuidstr); + goto cleanup; + } + + if (!virDomainIsActive(vm)) { + qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_INVALID, + "%s", _("domain is not running")); + goto cleanup; + } + + /* Migrate will always stop the VM, so once we support live dumping + the resume condition will stay the same, independent of whether + the stop command is issued. */ + resume = (vm->state == VIR_DOMAIN_RUNNING); + + /* Pause domain for non-live dump */ + if (vm->state == VIR_DOMAIN_RUNNING) { + if (qemudMonitorCommand (vm, "stop", &info) < 0) { + qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, + "%s", _("suspending before dump failed")); + goto cleanup; + } + DEBUG ("%s: stop reply: %s", vm->def->name, info); + VIR_FREE(info); + paused = 1; + } + + /* Migrate to file */ + safe_path = qemudEscapeShellArg(path); + if (!safe_path) { + virReportOOMError(dom->conn); + goto cleanup; + } + if (virAsprintf(&command, "migrate \"exec:" + "dd of='%s' 2>/dev/null" + "\"", safe_path) == -1) { + virReportOOMError(dom->conn); + command = NULL; + goto cleanup; + } + + if (qemudMonitorCommand(vm, command, &info) < 0) { + qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, + "%s", _("migrate operation failed")); + goto cleanup; + } + + DEBUG ("%s: migrate reply: %s", vm->def->name, info); + + /* If the command isn't supported then qemu prints: + * unknown command: migrate" */ + if (strstr(info, "unknown command:")) { + qemudReportError (dom->conn, dom, NULL, VIR_ERR_NO_SUPPORT, + "%s", + _("'migrate' not supported by this qemu")); + goto cleanup; + } + + paused = 1; + ret = 0; +cleanup: + VIR_FREE(safe_path); + VIR_FREE(command); + VIR_FREE(info); + + /* Since the monitor is always attached to a pty for libvirt, it + will support synchronous operations so we always get here after + the migration is complete. */ + if (resume && paused) { + if (qemudMonitorCommand(vm, "cont", &info) < 0) { + qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, + "%s", _("resuming after dump failed")); + goto cleanup; + } + DEBUG ("%s: cont reply: %s", vm->def->name, info); + VIR_FREE(info); + } + if (vm) + virDomainObjUnlock(vm); + return ret; +} + + static int qemudDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus) { struct qemud_driver *driver = dom->conn->privateData; virDomainObjPtr vm; @@ -5311,7 +5413,7 @@ static virDriver qemuDriver = { qemudDomainGetInfo, /* domainGetInfo */ qemudDomainSave, /* domainSave */ qemudDomainRestore, /* domainRestore */ - NULL, /* domainCoreDump */ + qemudDomainCoreDump, /* domainCoreDump */ qemudDomainSetVcpus, /* domainSetVcpus */ #if HAVE_SCHED_GETAFFINITY qemudDomainPinVcpu, /* domainPinVcpu */ -- 1.6.2.5

On Fri, Jul 10, 2009 at 06:17:34PM +0200, Paolo Bonzini wrote:
This patch uses a stop/migrate/cont combination to implement "virsh dump" for QEMU guests (BZ507551).
The code is mostly based on qemudDomainSave, except that the XML prolog is not included as it is not needed to examine the dump with e.g. crash.
The plan is to implement live dumping in the future. When that is done, it shouldn't require reindentation. This plan is also the reason for the "weird"
resume = (vm->state == VIR_DOMAIN_RUNNING); if (vm->state == VIR_DOMAIN_RUNNING) { ... }
* src/qemu_driver.c (qemudDomainCoreDump): New. (qemuDriver): Add core dump function. --- The virsh dump for xen does not crash the VM, and so does this KVM implementation.
Looks fine to me at this point ACK, For the subsequent patch adding live and crash options, that will need to modify include/libvirt/libvirt.h.in , then the two back-end of xen and qemu. Thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On Fri, Jul 10, 2009 at 06:17:34PM +0200, Paolo Bonzini wrote:
This patch uses a stop/migrate/cont combination to implement "virsh dump" for QEMU guests (BZ507551).
The code is mostly based on qemudDomainSave, except that the XML prolog is not included as it is not needed to examine the dump with e.g. crash.
The plan is to implement live dumping in the future. When that is done, it shouldn't require reindentation. This plan is also the reason for the "weird"
Okidoc, applied and commited now :-) thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (4)
-
Chris Lalancette
-
Daniel P. Berrange
-
Daniel Veillard
-
Paolo Bonzini