Bug 528678
Summary: | qemu-img does not correctly roundtrip data for VPC image format | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Daniel Berrangé <berrange> | ||||
Component: | qemu | Assignee: | Kevin Wolf <kwolf> | ||||
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | low | ||||||
Version: | rawhide | CC: | berrange, dwmw2, gcosta, itamar, jaswinder, jforbes, markmc, quintela, virt-maint | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2009-10-13 12:32:59 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 498969 | ||||||
Attachments: |
|
Description
Daniel Berrangé
2009-10-13 10:52:53 UTC
Created attachment 364572 [details]
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.
kevin: sounds like something you could sort out quickly if you had some time to spare :-) 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. 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 |