mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
add new virDomainCoreDumpWithFormat API
--memory-only option is introduced without compression supported. Now qemu has support for dumping domain's memory in kdump-compressed format. This patch adds a new virDomainCoreDumpWithFormat API, so that the format in which qemu dumps domain's memory can be specified. Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
1 parent
ccef7d7876
commit
9fbaff008c
8 files changed
+195
-6
No files matched your search
@@ -1180,6 +1180,29 @@ typedef enum {
|
||||
VIR_DUMP_MEMORY_ONLY = (1 << 4), /* use dump-guest-memory */
|
||||
} virDomainCoreDumpFlags;
|
||||
|
||||
/**
|
||||
* virDomainCoreDumpFormat:
|
||||
*
|
||||
* Values for specifying different formats of domain core dumps.
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_CORE_DUMP_FORMAT_RAW, /* dump guest memory in raw format */
|
||||
VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_ZLIB, /* kdump-compressed format, with
|
||||
* zlib compression */
|
||||
VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_LZO, /* kdump-compressed format, with
|
||||
* lzo compression */
|
||||
VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_SNAPPY, /* kdump-compressed format, with
|
||||
* snappy compression */
|
||||
#ifdef VIR_ENUM_SENTINELS
|
||||
VIR_DOMAIN_CORE_DUMP_FORMAT_LAST
|
||||
/*
|
||||
* NB: this enum value will increase over time as new events are
|
||||
* added to the libvirt API. It reflects the last state supported
|
||||
* by this version of the libvirt API.
|
||||
*/
|
||||
#endif
|
||||
} virDomainCoreDumpFormat;
|
||||
|
||||
/* Domain migration flags. */
|
||||
typedef enum {
|
||||
VIR_MIGRATE_LIVE = (1 << 0), /* live migration */
|
||||
@@ -1731,6 +1754,14 @@ int virDomainCoreDump (virDomainPtr domain,
|
||||
const char *to,
|
||||
unsigned int flags);
|
||||
|
||||
/*
|
||||
* Domain core dump with format specified
|
||||
*/
|
||||
int virDomainCoreDumpWithFormat (virDomainPtr domain,
|
||||
const char *to,
|
||||
unsigned int dumpformat,
|
||||
unsigned int flags);
|
||||
|
||||
/*
|
||||
* Screenshot of current domain console
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user