Bug 853762 - virt-sparsify should use a more robust method to detect the input format
Summary: virt-sparsify should use a more robust method to detect the input format
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 853763
TreeView+ depends on / blocked
 
Reported: 2012-09-02 18:33 UTC by Richard W.M. Jones
Modified: 2012-09-03 17:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 853763 (view as bug list)
Environment:
Last Closed: 2012-09-03 17:36:24 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2012-09-02 18:33:21 UTC
Description of problem:

Currently virt-sparsify runs the 'file -bsL' command on the
input disk image to try to detect the format.  This is not
robust as 'file' is often broken or might not know about the
disk format.  'file' has also been known to print different
things for different versions of the command, which is why
virt-sparsify breaks in RHEL 6.3:

rhel$ file -bsL /tmp/disk.qcow2 
Qemu Image, Format: Qcow , Version: 2
fedora$ file -bsL /tmp/disk.qcow2 
QEMU QCOW Image (v2), 10485760 bytes

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

libguestfs 1.16.19

How reproducible:

100%

Steps to Reproduce:
1. Use virt-sparsify on a file.
2. Don't specify the --convert argument.

Actual results:

Results will depend on the input format and the version of
'file' installed.  For example on RHEL 6.3 it will detect the
input format as raw, and so produce a raw output file.

Comment 1 Richard W.M. Jones 2012-09-03 17:36:12 UTC
Fixed in libguestfs 1.19.38.


Note You need to log in before you can comment on or make changes to this bug.