add --crash support to "virsh dump"

This patch adds the --crash option (already present in "xm dump-core")
to "virsh dump".  virDomainCoreDump already has a flags argument, so
the API/ABI is untouched.

* include/libvirt/libvirt.h.in (virDomainCoreDumpFlags): New flag for
  CoreDump
* src/test/test_driver.c (testDomainCoreDump): Do not crash
  after dump unless VIR_DUMP_CRASH is given.
* src/qemu/qemu_driver.c (qemudDomainCoreDump): Shutdown the domain
  instead of restarting it if --crash is passed.
* src/xen/xend_internal.c (xenDaemonDomainCoreDump): Support --crash.
* tools/virsh.c (opts_dump): Add --crash.
  (cmdDump): Map it to flags for virDomainCoreDump and pass them.
This commit is contained in:
Paolo Bonzini
2009-12-14 11:59:27 +01:00
committed by Daniel Veillard
parent f509e16241
commit b927aed8a3
5 changed files with 41 additions and 13 deletions

View File

@@ -334,6 +334,11 @@ struct _virDomainInterfaceStats {
typedef virDomainInterfaceStatsStruct *virDomainInterfaceStatsPtr;
/* Domain core dump flags. */
typedef enum {
VIR_DUMP_CRASH = (1 << 0), /* crash after dump */
} virDomainCoreDumpFlags;
/* Domain migration flags. */
typedef enum {
VIR_MIGRATE_LIVE = (1 << 0), /* live migration */