Bug 1618472

Summary: [v2v] Failed to run V2V with SSH transfer method
Product: Red Hat CloudForms Management Engine Reporter: Mor <mkalfon>
Component: UI - OPSAssignee: Brett Thurber <bthurber>
Status: CLOSED NOTABUG QA Contact: Jad Haj Yahya <jhajyahy>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.9.4CC: hkataria, lavenel, mpovolny, obarenbo
Target Milestone: GA   
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-16 19:10:39 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 import logs none

Description Mor 2018-08-16 17:53:58 UTC
Description of problem:
When trying to run v2v migration using SSH transfer method, I am getting the following error:
[   0.2] Opening the source -i vmx ssh://root.69.75/vmfs/volumes/netapp-v2v-datastore/100_VM_TEST_71/100_VM_TEST_71.vmx
scp 'root'@'10.12.69.75':''\''/vmfs/volumes/netapp-v2v-datastore/100_VM_TEST_71/100_VM_TEST_71.vmx'\''' '/var/tmp/vmx.mKv5rS/source.vmx'
Host key verification failed.

The V2V document states that migration using SSH method should be running using the vdsm user, and this log shows that root is being used.

Version-Release number of selected component (if applicable):
5.9.4.2.20180802030318_f91df08
RHV 4.2.5.3
VMware vSphere 6.5

How reproducible:
100%

Steps to Reproduce:
1. Install host using the 'ovirt-ansible-v2v-conversion-host' Ansible role
2. Tag host as conversion and with SSH transfer method.
3. Follow the instructions on V2V draft document on 'Configuring RHV Conversion Hosts for SSH Transformation' to copy SSH keys of vdsm to the ESXi host.
4. Run migration from VMware to RHV.

Actual results:
Migration fails.

Expected results:
Should succeed.

Additional info:

Comment 1 Mor 2018-08-16 17:55:30 UTC
Created attachment 1476476 [details]
virt-v2v import logs

Comment 2 Mor 2018-08-16 18:16:31 UTC
* Correction: vdsm user is being used, however it still fails on 'Host key verification failed.' even after copying the vdsm public key from RHV host to the ESXi host.

Comment 3 Mor 2018-08-16 19:10:39 UTC
Solved by accepting the remote ESXi server certificate the first time under vdsm user:
sudo -u vdsm ssh root@esxi_fqdn