]> xenbits.xensource.com Git - libvirt.git/commit
Compressed save image format for Qemu.
authorChris Lalancette <clalance@redhat.com>
Fri, 7 Aug 2009 11:34:05 +0000 (13:34 +0200)
committerChris Lalancette <clalance@redhat.com>
Mon, 17 Aug 2009 07:00:19 +0000 (09:00 +0200)
commit2d6a581960968e59a59baebe427c2ee6709303c2
treef8d929a2a0caa85afa684710e9a217b19a4cd0a8
parent444647d1e30abd3e7bf5be2781b1049c926a9b46
Compressed save image format for Qemu.

Implement a compressed save image format for qemu.  While ideally
we would have the choice between compressed/non-compressed
available to the libvirt API, unfortunately there is no "flags"
parameter to the virDomainSave() API.  Therefore, implement this
as a qemu.conf option.  gzip, bzip2, and lzma are implemented, and
it should be very easy to implement additional compression
methods.

One open question is if/how we should detect the compression
binaries.  One way to do it is to do compile-time setting of the
paths (via configure.in), but that doesn't seem like a great thing
to do.  My preferred solution is not to detect at all;
when we go to run the commands that need them, if they
aren't available, or aren't available in one of the standard paths,
then we'll fail.  That's also the solution implemented in this patch.

In the future, we'll have a more robust (managed) save/restore API,
at which time we can expose this functionality properly in the API.

V2: get rid of redundant dd command and just use >> to append data.
V3: Add back the missing pieces for the enum and bumping the save version.
V4: Make the compressed field in the save_header an int.
    Implement LZMA compression.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
src/qemu.conf
src/qemu_conf.c
src/qemu_conf.h
src/qemu_driver.c