qemu-img alters (breaks) disk image content when converting to VDI

Bug #984953 reported by Volker Grabsch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Committed
Undecided
Stefan Weil

Bug Description

When using "qemu-img convert" to create a VDI image, the VDI image is valid, but may contain an altered disk image. When such an image is run under VirtualBox, subtle bugs such as spontaneous segmentation faults happen because of broken system libraries.

The following set of commands reproduces the bug (using the provided test disk image slice):

bunzip2 < test-2M-2.raw.bz2 > test.raw
qemu-img convert -O vdi test.raw test-2.vdi
qemu-img convert -O raw test-2.vdi test-2.raw
diff -qs test.raw test-2.raw
# Output: Files test.raw and test-2.raw differ

If the VDI image is created via "VBoxManage convertfromraw", everything is okay:

VBoxManage convertfromraw test.raw test-3.vdi --format VDI
qemu-img convert -O raw test-3.vdi test-3.raw
diff -qs test.raw test-3.raw
# Output: Files test.raw and test-3.raw are identical

Tags: qemu-img
Revision history for this message
Volker Grabsch (vog-i) wrote :
Volker Grabsch (vog-i)
description: updated
Revision history for this message
Stefan Weil (ubuntu-weilnetz) wrote :

Which version of QEMU did you use? I think your report is a
duplicate of bug report #919242. It was fixed by this commit:

commit 641543b76b82a8b361482b727e08de0c8ec093b0
Author: Stefan Weil <email address hidden>
Date: Sat Jan 21 13:54:24 2012 +0100

    block/vdi: Zero unused parts when allocating a new block (fix #919242)

Latest QEMU does not show an error with your test sequence.

Regards,

Stefan Weil

Changed in qemu:
assignee: nobody → Stefan Weil (ubuntu-weilnetz)
Revision history for this message
Volker Grabsch (vog-i) wrote :

I tested against the latest QEMU release (1.0.1) as provided by Debian/Wheezy. I also verified that the bug exists when I build qemu-img from the official source tarball.

However, the bug no longer appears in the latest Git checkout (tested against 51006bb).

I'm a bit confused that this bugfix (which happened on Jan 21) didn't get into the latest release (which happened on Feb 2).

Changed in qemu:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.