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 1251909 - Option -oa preallocated -of qcow2 of virt-v2v didn't work efficiently
Summary: Option -oa preallocated -of qcow2 of virt-v2v didn't work efficiently
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.2
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-10 09:34 UTC by tingting zheng
Modified: 2015-11-19 07:03 UTC (History)
6 users (show)

Fixed In Version: libguestfs-1.28.1-1.51.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 07:03:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Log info (424.25 KB, text/plain)
2015-08-10 09:34 UTC, tingting zheng
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2183 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-11-19 08:18:42 UTC

Description tingting zheng 2015-08-10 09:34:47 UTC
Created attachment 1060991 [details]
Log info

Description:
Option -oa preallocated -of qcow2 of virt-v2v didn't work efficiently

Version:
libvirt-1.2.17-3.el7.x86_64
virt-v2v-1.28.1-1.49.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Use virt-v2v to convert guest with -oa preallocated -of qcow2.
# virt-v2v -ic xen+ssh://10.66.106.64 -os default -oa preallocated xen-hvm-rhel7.1-x86_64 -of qcow2 -on qcow2-preallocated
[   0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 xen-hvm-rhel7.1-x86_64
[   1.0] Creating an overlay to protect the source from being modified
[   1.0] Opening the overlay
[   6.0] Initializing the target -o libvirt -os default
[   6.0] Inspecting the overlay
[  29.0] Checking for sufficient free disk space in the guest
[  29.0] Estimating space required on target for each disk
[  29.0] Converting Red Hat Enterprise Linux Server release 7.1 (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 191.0] Mapping filesystem data to avoid copying unused and blank areas
[ 191.0] Closing the overlay
[ 192.0] Checking if the guest needs BIOS or UEFI to boot
[ 192.0] Copying disk 1/1 to /var/lib/libvirt/images/qcow2-preallocated-sda (qcow2)
    (100.00/100%)
[ 520.0] Creating output metadata
Pool default refreshed

Domain qcow2-preallocate defined from /tmp/v2vlibvirt10ab6c.xml

[ 520.0] Finishing off

2.After conversion,check the disk,it's not fully peallocated.
# ll -lsh /var/lib/libvirt/images/qcow2-preallocated-sda
3.2G -rw-r--r--. 1 root root 5.9G Aug 10 17:21 /var/lib/libvirt/images/qcow2-preallocated-sda

# qemu-img info /var/lib/libvirt/images/qcow2-preallocated-sda
image: /var/lib/libvirt/images/qcow2-preallocated-sda
file format: qcow2
virtual size: 5.9G (6291456000 bytes)
disk size: 3.2G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false


Actual results:
As description.

Expected results:
Option -oa preallocated -of qcow2 work efficiently

Additional info:
1.Option -oa preallocated -of raw work efficiently.
2.Attached the detailed log.

Comment 3 Richard W.M. Jones 2015-08-12 15:59:24 UTC
Moving to RHEL 7.3 since the bug isn't really very serious.

Comment 4 Richard W.M. Jones 2015-09-01 05:24:00 UTC
Upstream commits:

66daad38f37c8975c4b6bcb760094cf4490fef14
42b6bb12dcbc5103044a9099d71f17a82009e7de

Comment 5 Richard W.M. Jones 2015-09-01 05:25:15 UTC
Since I need to do another build of libguestfs today
because of a regression, might as well take this bug
for RHEL 7.2.

Comment 7 tingting zheng 2015-09-02 10:13:09 UTC
Tested the bug with:
virt-v2v-1.28.1-1.51.el7.x86_64

Steps:
1.Use virt-v2v to convert guest with -oa preallocated -of qcow2.
# virt-v2v -ic xen+ssh://10.66.106.64 -os default -oa preallocated xen-hvm-rhel7.1-x86_64 -of qcow2 -on qcow2-preallocated
[   0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 xen-hvm-rhel7.1-x86_64
[   0.0] Creating an overlay to protect the source from being modified
[   1.0] Opening the overlay
[   8.0] Initializing the target -o libvirt -os default
[   8.0] Inspecting the overlay
[  31.0] Checking for sufficient free disk space in the guest
[  31.0] Estimating space required on target for each disk
[  31.0] Converting Red Hat Enterprise Linux Server release 7.1 (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 140.0] Mapping filesystem data to avoid copying unused and blank areas
[ 140.0] Closing the overlay
[ 142.0] Checking if the guest needs BIOS or UEFI to boot
[ 142.0] Copying disk 1/1 to /var/lib/libvirt/images/qcow2-preallocated-sda (qcow2)
    (100.00/100%)
[ 449.0] Creating output metadata
Pool default refreshed

Domain qcow2-preallocated defined from /tmp/v2vlibvirt953164.xml

[ 451.0] Finishing off


2.After conversion,check the disk,it's fully peallocated.
# ll -lsh qcow2-preallocated-sda
5.9G -rw-r--r--. 1 root root 5.9G Sep  2 17:59 qcow2-preallocated-sda

# qemu-img info qcow2-preallocated-sda
image: qcow2-preallocated-sda
file format: qcow2
virtual size: 5.9G (6291456000 bytes)
disk size: 5.9G
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false

Refer the above comments,the bug has been fixed,so move it's status to VERIFIED.

Comment 9 errata-xmlrpc 2015-11-19 07:03:04 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-2183.html


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