Bug 1251909 - Option -oa preallocated -of qcow2 of virt-v2v didn't work efficiently
Option -oa preallocated -of qcow2 of virt-v2v didn't work efficiently
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs (Show other bugs)
7.2
x86_64 Unspecified
medium Severity medium
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
V2V
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-10 05:34 EDT by tingting zheng
Modified: 2015-11-19 02:03 EST (History)
6 users (show)

See Also:
Fixed In Version: libguestfs-1.28.1-1.51.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-19 02:03:04 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description tingting zheng 2015-08-10 05:34:47 EDT
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 11:59:24 EDT
Moving to RHEL 7.3 since the bug isn't really very serious.
Comment 4 Richard W.M. Jones 2015-09-01 01:24:00 EDT
Upstream commits:

66daad38f37c8975c4b6bcb760094cf4490fef14
42b6bb12dcbc5103044a9099d71f17a82009e7de
Comment 5 Richard W.M. Jones 2015-09-01 01:25:15 EDT
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 06:13:09 EDT
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 02:03:04 EST
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.