Red Hat Bugzilla – Bug 485471
blktap qcow driver uses incompatible endianess vs qemu's qcow driver
Last modified: 2014-02-02 17:36:49 EST
Description of problem:
The Xen blktap driver uses native endian L1 tables for qcow files. QEMU defines that the format is always big-endian. This means Xen qcow files are incompatible with QEMUs. This may hurt people migrating to KVM.
The following upstream changeset fixed Xen.
user: Keir Fraser <email@example.com>
date: Thu Mar 27 17:13:37 2008 +0000
tapdisk: Fix L1 table endianess of qcow images
Fix tapdisk to use big endian L1 tables as used by qemu/ioemu. Old
tapdisk images with native endianess are automagically converted to
big endian when the image file is opened for the first time.
Signed-off-by: Kevin Wolf <firstname.lastname@example.org>
Version-Release number of selected component (if applicable):
Not tried to reproduce, but should be doable by creating a qcow image under xen, and seeing if it then works in KVM
Steps to Reproduce:
Created attachment 332359 [details]
Blktap qcow endianess compatibility fix
This is patch correcting endianess compatibility problem in PV and FV guests. Both PV and FV now can use the same QCOW image. It's a backport of upstream at http://xenbits.xensource.com/xen-unstable.hg?rev/17e30b91b9e2 .
Created attachment 332722 [details]
Patch after last BLKTAP update
Because of my last update concerning qcow image and poll-on-aio patch in BZ #486353 I had to create a new patch for this problem. Here it is. It solves endianess problem and it has been tested on RHEL 5.3 Xen and the same qcow image worked fine for both PV and FV guests...
Created attachment 341757 [details]
Original version of this patch from upstream
This is upstream version that could be applied without modifications.
Fix built into xen-3.0.3-86.el5
Verified on xen-3.0.3-91.el5
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.