Launchpad has imported 5 comments from the remote bug at
https://bugzilla.redhat.com/show_bug.cgi?id=528678.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2009-10-13T10:52:53+00:00 Daniel wrote:

Description of problem:
If you create a raw file, convert it to VPC format with qemu-img, and then 
convert it back to raw format, the resulting raw file is not the same as the 
original. All the other disk formats roundtrip reliably, but not VPC.

Version-Release number of selected component (if applicable):


How reproducible:
qemu-0.11.0-6.fc11.i586

Steps to Reproduce:
1. dd if=/dev/zero of=input.img bs=1M count=50
2. qemu-img convert -f raw -O vpc input.img output.img
3. qemu-img convert -f vpc -O raw output.img input2.img
4. md5sum input.img 
5. md5sum input2.img 
6. ls -l input.img 
7. ls -l input2.img 


Actual results:
25e317773f308e446cc84c503a6d1f85  input.img
b699e19dd8d468dbd7264df67ca7f798  input2.img
-rw-rw-r--. 1 berrange berrange 52428800 2009-10-13 11:44 input.img
-rw-r--r--. 1 berrange berrange 52432896 2009-10-13 11:45 input2.img


Expected results:
input.img and input2.img should be identical in everyway.

Additional info:

Reply at: https://bugs.launchpad.net/ubuntu/+source/qemu-
kvm/+bug/882197/comments/0

------------------------------------------------------------------------
On 2009-10-13T11:16:32+00:00 Daniel wrote:

Created attachment 364572
Example failure when testing libvirt cloning API

FYI, the original way we discovered this bug was via the libvirt TCK's
storage cloning tests. That tests creates a raw volume with a special
data pattern, and then tests conversion to & from every QEMU writable
disk format. We currently have to mark the VPC tests as TODO, since we
get md5sum mis-matches after VPC -> raw conversion with unexpected extra
NULL bytes appended on the final raw file.

Reply at: https://bugs.launchpad.net/ubuntu/+source/qemu-
kvm/+bug/882197/comments/1

------------------------------------------------------------------------
On 2009-10-13T11:22:58+00:00 Mark wrote:

kevin: sounds like something you could sort out quickly if you had some
time to spare :-)

Reply at: https://bugs.launchpad.net/ubuntu/+source/qemu-
kvm/+bug/882197/comments/2

------------------------------------------------------------------------
On 2009-10-13T12:32:59+00:00 Kevin wrote:

This is known problem, but I think this is not a qemu bug but a
shortcoming of the VHD format (or VirtualPC's handling of that format)
where we are doomed to do it wrong at some place. Adding zeros seemed to
be the least wrong thing when I implemented it.

For reference, I explained the behaviour in 
http://lists.gnu.org/archive/html/qemu-devel/2009-08/msg00570.html:
> I think this depends on the definition of "correct". VPC unfortunately
> seems to like contradicting values in its image - CHS geometry and image
> size rarely match. The guest seemed to see the CHS geometry, so I
> changed the code to take the geometry instead of the size header field
> to calculate the image size.

If we didn't round up to the next matching CHS values and used the exact
value, our images would seem to be truncated in VirtualPC. You shouldn't
observe the problem when you choose the image size so that its size can
be represented exactly in a CHS geometry.

Reply at: https://bugs.launchpad.net/ubuntu/+source/qemu-
kvm/+bug/882197/comments/3

------------------------------------------------------------------------
On 2009-10-13T19:40:40+00:00 Daniel wrote:

Worked around the patch in this commit, by adding 4k to the disk size to
make it a nice size for CHS geom

http://libvirt.org/git/?p=libvirt-
tck.git;a=commit;h=9eedd1ed9887fe294c8d856fc7142c6716799216

Reply at: https://bugs.launchpad.net/ubuntu/+source/qemu-
kvm/+bug/882197/comments/4


** Changed in: qemu-kvm (Fedora)
       Status: Unknown => Invalid

** Changed in: qemu-kvm (Fedora)
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/882197

Title:
  data loss in conversion to or from vpc

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/882197/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to