Bug 1415935

Summary: virt-v2v auto running convert esx guests failed with error "qemu-img: error while reading sector 24942336: Protocol error"
Product: Red Hat Enterprise Linux 7 Reporter: kuwei <kuwei>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: haizhao, juzhou, kuwei, mxie, mzhan, ptoscano, tzheng, xiaodwan
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-16 17:03:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
virt-v2v-auto-running none

Description kuwei@redhat.com 2017-01-24 06:42:47 UTC
virt-v2v auto running to convert esx guests  failed with error "qemu-img: error while reading sector 24942336: Protocol error"

Package version:
libguestfs-1.32.7-3.el7.3.x86_64
virt-v2v-1.32.7-3.el7.3.x86_64

Scenario 1:
1.The test results of virt-v2v auto running for all esx guests are failed,because when using virt-v2v to convert guests from vmware to libvirt by auto running,and the error info is "qemu-img: error while reading sector 24942336: Protocol error", details pls refer to log"virt-v2v-auto-running"

The environment of virt-v2v auto running:
Server IP:
  10.73.72.xx
Packages:
  virt-v2v-1.32.7-3.el7.3.x86_64
  libguestfs-1.32.7-3.el7.3.x86_64

Scenario 2:
1.Try to use virt-v2v convert guest from vmware to libvirt by manual on above server 10.73.72.xx, found the speed of converting is so slow that v2v conversion still can't be finished after 2h,actually, v2v will cost 2.5h to convert a linux guest from vmware to libvirt and converting a windows guest cost more time (3h+),the hopes between v2v auto machine(10.73.72.xx) and esx6.0 server is as below 
#traceroute 10.73.72.61
traceroute to 10.73.72.61 (10.73.72.61), 30 hops max, 60 byte packets
 1  * * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *
.....
.....
30  * * *
Scenario 3:
1.The test results of virt-v2v auto running for all xen guests are passed and the speed is normal when using virt-v2v convert guest from xen to libvirt by manual on this v2v auto machine,the hopes between v2v auto machine(10.73.72.xx) and xen server is as below 
# traceroute 10.73.3.21
traceroute to 10.73.3.21 (10.73.3.21), 30 hops max, 60 byte packets
 1  gateway (10.73.75.254)  42.786 ms  42.770 ms  42.759 ms
 2  10.72.0.54 (10.72.0.54)  0.695 ms  0.709 ms  0.725 ms
 3  10.72.0.49 (10.72.0.49)  0.892 ms 10.72.0.51 (10.72.0.51)  1.148 ms 10.72.0.49 (10.72.0.49)  0.938 ms
 4  * * *
 5  hp-dl360eg8-08.lab.eng.pek2.redhat.com (10.73.3.21)  4.171 ms  4.149 ms  4.129 ms


Additional info:

About the virt-v2v packages you can get from the bug https://bugzilla.redhat.com/show_bug.cgi?id=1414505 comment5 :http://oirase.annexia.org/tmp/bz1414505/

Comment 1 kuwei@redhat.com 2017-01-24 06:45:58 UTC
Created attachment 1243828 [details]
virt-v2v-auto-running

Comment 3 Richard W.M. Jones 2017-01-24 13:24:09 UTC
The causes of this are always:

(1) The vCenter server is too slow.
http://libguestfs.org/virt-v2v.1.html#vmware-vcenter-resources

(2) The network connection is interrupted in some way.  For
example, there is actual network break, or a machine gets
assigned a different IP address.

> #traceroute 10.73.72.61
> traceroute to 10.73.72.61 (10.73.72.61), 30 hops max, 60 byte packets
>  1  * * *
>  2  * * *

I don't understand this traceroute.  Address 10.73.72.61 is
not mentioned at all in the virt-v2v log file.

Comment 7 Richard W.M. Jones 2017-02-09 10:32:40 UTC
These commits were added upstream which should prevent ssh
connections from being dropped:

https://github.com/libguestfs/libguestfs/commit/0de08f6527c9d825e85366e5f43e78df1e5842e9
https://github.com/libguestfs/libguestfs/commit/27b64f82272a5bcc3caf8aa17ce4afd2a52a943c
https://github.com/libguestfs/libguestfs/commit/2f97cd5517e68128d6d93d27ca6bd328bbd4a4da
https://github.com/libguestfs/libguestfs/commit/a1bc37d673d8d8b2db8a88cea51ec1a46bf0c8da

However I don't believe this is related to the cause of this
bug which will be down to network slowness or interruption
(see comment 3).