Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
It seems like `qemu-img --help` may just crash when being run by virt-sparsify to determine its version, causing virt-sparsify to fail.
A workaround to this situation seems to be reading all the output instead of just the first line of it. This does not apply to RHEL 7.1+, as a newer qemu is required and thus there is no need to get the qemu-img version.
Version-Release number of selected component (if applicable):
libguestfs-1.20.11-13.el6
How reproducible:
Running virt-sparsify, sometimes.
Expected results:
virt-sparsify works.
Actually I take it back: `qemu-img --help` seems to not like much when closing stdout for it while it is still running (that is, closing the process after reading only the first line of its lengthy output.
So yes, we need to read its output to not get into troubles.
Verified with the packages:
libguestfs-1.20.11-16.el6.x86_64
Verify steps:
# guestfish -N fs
Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.
Type: 'help' for help on commands
'man' to read the manual
'quit' to quit the shell
><fs> quit
# virt-sparsify test1.img outdisk.img -x -v
......
guestfsd: main_llibguestfs: recv_from_daemon: 40 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 01 1a | 00 00 00 01 | 00 12 34 0d | ...
libguestfs: trace: internal_autosync = 0
libguestfs: sending SIGTERM to process 17063
libguestfs: trace: shutdown = 0
libguestfs: trace: close
libguestfs: closing guestfs handle 0x1e13d50 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfswvXl1p
Copy to destination and make sparse ...
qemu-img convert -f qcow2 -O 'raw' '/tmp/sparsify28214f.qcow2' './outdisk.img'
Sparsify operation completed with no errors. Before deleting the old
disk, carefully check that the target disk boots and works correctly.
Repeat the command above for several times, there is no error occurred.
Can also refer to bug #1233292 which has been fixed, and this bug will be fixed too.
So verified.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2016-0762.html