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.
Bug 1113020 - Support virt-sparsify option to allow specifying temporary file or block device
Summary: Support virt-sparsify option to allow specifying temporary file or block device
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1021149
Blocks: 1035038 1082754 1113520 1117540 1134633 1134635
TreeView+ depends on / blocked
 
Reported: 2014-06-25 09:44 UTC by Federico Simoncelli
Modified: 2015-03-05 13:43 UTC (History)
5 users (show)

Fixed In Version: libguestfs-1.27.56-1.1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1117540 1134633 1134635 (view as bug list)
Environment:
Last Closed: 2015-03-05 13:43:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0303 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-03-05 17:34:44 UTC

Description Federico Simoncelli 2014-06-25 09:44:05 UTC
Description of problem:
virt-sparsify requires a large amount of temporary space in order to sparsify an image. On oVirt nodes we may not have enough temporary local space and we don't want to pollute the hosts with potentially sensible data (even though the temporary layer would most likely just contain zeroes).

It should be possible to specify a temporary oVirt volume (residing on the storage domains) that can be used for processing the image.
The volume can either be a single file or a single block device (logical volume).

Comment 2 Richard W.M. Jones 2014-06-25 09:54:27 UTC
Upstream commit is 870c17e99acd038daed9b4004c66d401679475ab
which is in libguestfs >= 1.27.16.

For RHEL 7 this will be solved by the rebase (bug 1021149)
so I will set that as a dependency.

Comment 4 Richard W.M. Jones 2014-06-25 10:49:29 UTC
Please note there is a RHEL 7.1 preview repository:

https://www.redhat.com/archives/libguestfs/2014-May/msg00090.html

Later today I will upload a version of libguestfs which
contains the new virt-sparsify + --tmp option.

Comment 5 Federico Simoncelli 2014-07-15 11:01:16 UTC
We also need the --tmp prebuilt: support.

Comment 6 Richard W.M. Jones 2014-07-15 11:03:00 UTC
(In reply to Federico Simoncelli from comment #5)
> We also need the --tmp prebuilt: support.

The rebase (bug 1021149) will pick that up.  Need to check that
it works in the final package however.

Comment 8 yuliu 2014-11-10 09:34:19 UTC
version: 

Steps:
# virt-sparsify rhel-guest-image-6.5-20140926.0.x86_64.qcow2 /guest-image.qcow2 --tmp /nfs2/

# virt-sparsify rhel-guest-image-6.5-20140926.0.x86_64.qcow2 /guest-image.qcow2 --tmp /nfs2/
Input disk virtual size = 17179869184 bytes (16.0G)
Create overlay file in /nfs2/ to protect source disk ...
Examine source disk ...
 100% ⟦▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒⟧ --:--
Fill free space in /dev/sda1 with zero ...
 100% ⟦▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒⟧ 00:00
Copy to destination and make sparse ...

Sparsify operation completed with no errors.  Before deleting the old disk, 
carefully check that the target disk boots and works correctly.
# ll guest-image.qcow2 
-rw-r--r--. 1 root root 823721984 Nov 10 17:32 guest-image.qcow2

Verified as above.

Comment 10 errata-xmlrpc 2015-03-05 13:43:53 UTC
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-2015-0303.html


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