From b76825ccd12552408a84a9b4e4bbe3926d22709e Mon Sep 17 00:00:00 2001 Message-Id: <b76825ccd12552408a84a9b4e4bbe3926d22709e.1283420932.git.jdenemar@redhat.com> From: Jiri Denemark <jdenemar@redhat.com> Date: Tue, 24 Aug 2010 15:00:52 +0200 Subject: [PATCH] qemu: Disable lzop compression RHEL-5 doesn't provide lzop package and configuring qemu to use lzop compression results in user unfriendly error: operation failed: Migration unexpectedly failed with the real reason being printed in GUEST.log only: sh: lzop: command not found So let's disable support for lzop compression at the source code level to achieve a much better error message: operation failed: Invalid save image format specified in configuration file --- src/qemu/qemu.conf | 2 +- src/qemu/qemu_driver.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf index 93934f3..188f23c 100644 --- a/src/qemu/qemu.conf +++ b/src/qemu/qemu.conf @@ -139,7 +139,7 @@ # memory from the domain is dumped out directly to a file. If you have # guests with a large amount of memory, however, this can take up quite # a bit of space. If you would like to compress the images while they -# are being saved to disk, you can also set "lzop", "gzip", "bzip2", or "xz" +# are being saved to disk, you can also set "gzip", "bzip2", or "xz" # for save_image_format. Note that this means you slow down the process of # saving a domain in order to save disk space; the list above is in descending # order by performance and ascending order by compression ratio. diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 487bfa3..78be930 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4915,7 +4915,10 @@ enum qemud_save_formats { * QEMUD_SAVE_FORMAT_LZMA */ QEMUD_SAVE_FORMAT_XZ = 3, - QEMUD_SAVE_FORMAT_LZOP = 4, + /* + * Disabled: LZOP is not available on RHEL-5 + * QEMUD_SAVE_FORMAT_LZOP = 4, + */ /* Note: add new members only at the end. These values are used in the on-disk format. Do not change or re-use numbers. */ @@ -4928,8 +4931,12 @@ VIR_ENUM_IMPL(qemudSaveCompression, QEMUD_SAVE_FORMAT_LAST, "raw", "gzip", "bzip2", - "xz", - "lzop") + "xz" + /* + * Disabled: LZOP is not available on RHEL-5 + * "lzop" + */ + ) struct qemud_save_header { char magic[sizeof(QEMUD_SAVE_MAGIC)-1]; -- 1.7.2.2