Bug 1812805 - Option -oa preallocated doesn't work if set disk format as qcow2 during v2v conversion
Summary: Option -oa preallocated doesn't work if set disk format as qcow2 during v2v c...
Keywords:
Status: CLOSED DUPLICATE of bug 1791831
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libguestfs
Version: 8.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.0
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-12 08:39 UTC by mxie@redhat.com
Modified: 2020-03-12 10:15 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-12 10:15:51 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description mxie@redhat.com 2020-03-12 08:39:42 UTC
Description of problem:
Option -oa preallocated doesn't work if set disk format as qcow2 during v2v conversion

Version-Release number of selected component:
virt-v2v-1.40.2-21.module+el8.2.0+5851+8d6a931b.x86_64
libguestfs-1.40.2-21.module+el8.2.0+5851+8d6a931b.x86_64
libvirt-6.0.0-10.module+el8.2.0+5984+dce93708.x86_64
qemu-kvm-4.2.0-13.module+el8.2.0+5898+fb4bceae.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Convert a guest from Xen to libvirt by virt-v2v, set disk format as qcow2 and -oa preallocated in command line
# virt-v2v -i libvirt -ic xen+ssh://root.224.33/ xen-hvm-rhel7.8-x86_64  -oa preallocated -b virbr0 -n default -of qcow2
[   0.0] Opening the source -i libvirt -ic xen+ssh://root.224.33/ xen-hvm-rhel7.8-x86_64
[   0.5] Creating an overlay to protect the source from being modified
[   0.9] Opening the overlay
[   9.4] Inspecting the overlay
[  39.9] Checking for sufficient free disk space in the guest
[  39.9] Estimating space required on target for each disk
[  39.9] Converting Red Hat Enterprise Linux Server 7.8 Beta (Maipo) to run on KVM
virt-v2v: warning: guest tools directory ‘linux/el7’ is missing from 
the virtio-win directory or ISO.

Guest tools are only provided in the RHV Guest Tools ISO, so this can 
happen if you are using the version of virtio-win which contains just the 
virtio drivers.  In this case only virtio drivers can be installed in the 
guest, and installation of Guest Tools will be skipped.
virt-v2v: This guest has virtio drivers installed.
[ 207.4] Mapping filesystem data to avoid copying unused and blank areas
[ 208.1] Closing the overlay
[ 208.2] Assigning disks to buses
[ 208.2] Checking if the guest needs BIOS or UEFI to boot
[ 208.2] Initializing the target -o libvirt -os default
[ 208.3] Copying disk 1/1 to /var/lib/libvirt/images/xen-hvm-rhel7.8-x86_64-sda (qcow2)
    (100.00/100%)
[ 669.8] Creating output metadata
Pool default refreshed

Domain xen-hvm-rhel7.8-x86_64 defined from /tmp/v2vlibvirt15ee88.xml

[ 669.9] Finishing off

2. Check disk info after v2v conversion, find v2v actually used sparse allocation mode to convert the guest
# qemu-img info /var/lib/libvirt/images/xen-hvm-rhel7.8-x86_64-sda 
image: /var/lib/libvirt/images/xen-hvm-rhel7.8-x86_64-sda
file format: qcow2
virtual size: 8.79 GiB (9437184000 bytes)
disk size: 4.97 GiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false


Actual results:
As description, details log pls refer to below link

https://libvirt-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/v2v/view/RHEL-8.2/job/v2v-RHEL-8.2-runtest-x86_64-function-v2v_options-rhel/2/testReport/rhel/v2v_options/positive_test_option_oa_preallocated_input_mode_libvirt_xen_output_mode_libvirt/

Expected results:
Option -oa preallocated works well if set disk format as qcow2 during v2v conversion

Additional info:
1.Option -oa preallocated works well if set disk format as raw during v2v conversion
# virt-v2v -i libvirt -ic xen+ssh://root.224.33/ xen-hvm-rhel7.8-x86_64  -oa preallocated -b virbr0 -n default -of raw -on preallocated-raw 
[   0.0] Opening the source -i libvirt -ic xen+ssh://root.224.33/ xen-hvm-rhel7.8-x86_64
[   0.5] Creating an overlay to protect the source from being modified
[   0.9] Opening the overlay
[   5.3] Inspecting the overlay
[  33.5] Checking for sufficient free disk space in the guest
[  33.5] Estimating space required on target for each disk
[  33.5] Converting Red Hat Enterprise Linux Server 7.8 Beta (Maipo) to run on KVM
virt-v2v: warning: guest tools directory ‘linux/el7’ is missing from 
the virtio-win directory or ISO.

Guest tools are only provided in the RHV Guest Tools ISO, so this can 
happen if you are using the version of virtio-win which contains just the 
virtio drivers.  In this case only virtio drivers can be installed in the 
guest, and installation of Guest Tools will be skipped.
virt-v2v: This guest has virtio drivers installed.
[ 178.4] Mapping filesystem data to avoid copying unused and blank areas
[ 179.1] Closing the overlay
[ 179.2] Assigning disks to buses
[ 179.2] Checking if the guest needs BIOS or UEFI to boot
[ 179.2] Initializing the target -o libvirt -os default
[ 179.2] Copying disk 1/1 to /var/lib/libvirt/images/preallocated-raw-sda (raw)
    (100.00/100%)
[ 623.3] Creating output metadata
Pool default refreshed

Domain preallocated-raw defined from /tmp/v2vlibvirt802215.xml

[ 623.3] Finishing off

# qemu-img info /var/lib/libvirt/images/preallocated-raw-sda
image: /var/lib/libvirt/images/preallocated-raw-sda
file format: raw
virtual size: 8.79 GiB (9437184000 bytes)
disk size: 8.79 GiB


2. Can't reproduce the bug with virt-v2v-1.38.4-15.module+el8.2.0+5297
https://libvirt-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/v2v-RHEL-8.2-runtest-x86_64-function-v2v_options-rhel/1/testReport/rhel/v2v_options/positive_test_option_oa_preallocated_input_mode_libvirt_xen_output_mode_libvirt/

3. Can't reproduce the bug with virt-v2v-1.40.2-16.module+el8.1.1+5309+6d656f05.x86_64
https://libvirt-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/v2v/view/RHEL-8.1/job/v2v-RHEL-8.1-runtest-x86_64-function-v2v_options-rhel/6/testReport/rhel/v2v_options/positive_test_option_oa_preallocated_input_mode_libvirt_xen_output_mode_libvirt/

Comment 1 Richard W.M. Jones 2020-03-12 08:48:28 UTC
I think this is a possible duplicate of bug 1791831.  If it's the same bug
it's actually caused by a change in qemu, not in virt-v2v.

Comment 2 mxie@redhat.com 2020-03-12 09:47:00 UTC
(In reply to Richard W.M. Jones from comment #1)
> I think this is a possible duplicate of bug 1791831.  If it's the same bug
> it's actually caused by a change in qemu, not in virt-v2v.

Yes, you are right, I forgot bug1791831, pls help to close the bug as duplicated, thanks.

Comment 3 Richard W.M. Jones 2020-03-12 10:15:51 UTC

*** This bug has been marked as a duplicate of bug 1791831 ***


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