Bug 1291055

Summary: v2v: Conversion of VM from VMware environment failed with "HTTP/1.1 404 Not Found".
Product: Red Hat Enterprise Linux 7 Reporter: Nisim Simsolo <nsimsolo>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 7.2CC: ahadas, gklein, mgoldboi, michal.skrivanek, nsimsolo, ptoscano, rjones, shavivi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
VMware vCenter server 6.0.0 build 2656760 VMware ESXi server 6.0.0 build 2494585 RHEVM engine - 3.6.1.2-0.1.el6 RHEVM hosts - RHEL 7.2
Last Closed: 2016-01-07 14:19:37 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:
Bug Depends On:    
Bug Blocks: 952703, 1236075    
Attachments:
Description Flags
vdsm.log
none
engine.log none

Description Nisim Simsolo 2015-12-13 09:09:22 UTC
Description of problem:
Trying to import VMware VM from RHEVM failed with "HTTP/1.1 404 Not Found" when trying to get storage path.
VMware environment is 6.0.0 licensed and VMware VM I'm trying to import is with NFS disk.

Version-Release number of selected component (if applicable):
engine: 
rhevm-3.6.1.2-0.1.el6
host (RHEL 7.2):
libvirt-client-1.2.17-13.el7_2.2.x86_64
qemu-kvm-rhev-2.3.0-31.el7_2.4.x86_64
vdsm-4.17.13-1.el7ev

How reproducible:
100%

Steps to Reproduce:
1. From vSphere client, create DC -> Cluster -> add host -> create VM with NFS storage (keep VM powered off during the next steps).
2. Open RHEVM, navigate to virtual machines tab -> click import.
3. Enter vCenter details and credentials -> click "load"
4. Select one of the VMs that were listed to import and click "next".
5. Select host and storage domain destination -> click "ok"

Actual results:
After import process started, it failed during import VM disk phase with the next engine.log (IP address changed to 10.X.X.X by me):
2015-12-13 10:15:40,742 INFO  [org.ovirt.engine.core.bll.ConvertVmCallback] (DefaultQuartzScheduler_Worker-27) [] Conversion of VM from exteral enironment failed: Job u'423c3d8c-15e9-4650-f0fa-02d0a8332ea9' process failed exit-code: 1, stderr: curl -q --insecure --user '<hidden>' --head --silent --url 'https://10.X.X.X/folder/rhel7/rhel7-flat.vmdk?dcPath=Compute/cluster&dsName=storage'
HTTP/1.1 404 Not Found
Date: Sun, 13 Dec 2015 08:16:14 GMT
Set-Cookie: vmware_soap_session="c905314a0fd3cec35f9442c995f067b3704e08ec"; Path=/; HttpOnly; Secure; 
Connection: close
Content-Type: text; charset=plain
Content-Length: 0

virt-v2v: error: vcenter: URL not found: 
https://10.35.161.20/folder/rhel7/rhel7-flat.vmdk?dcPath=Compute/cluster&dsName=storage

Expected results:
Import VM should succeed.

Additional info:
engine.log and vdsm.log attached.
vdsm issue occurred at: Thread-29651::ERROR::2015-12-13 10:16:14,715
engine issue occurred at: 2015-12-13 10:15:40,742

Comment 1 Nisim Simsolo 2015-12-13 09:10:11 UTC
Created attachment 1105283 [details]
vdsm.log

Comment 2 Nisim Simsolo 2015-12-13 09:10:37 UTC
Created attachment 1105284 [details]
engine.log

Comment 3 Nisim Simsolo 2015-12-13 11:33:29 UTC
I also tried to disable SELinux and turn off iptables, issue is still reproduced.

Comment 4 Richard W.M. Jones 2015-12-13 15:13:23 UTC
This is probably a duplicate of
https://bugzilla.redhat.com/show_bug.cgi?id=1256823

There are only two realistic solutions to this:

(1) Modify the UI so that the user can pass in the dcpath
parameter (which is then passed through to the virt-v2v
command line).

However that's going to be annoying to document, so a
better solution is:

(2) Wait for RHEL 7.3 where a combination of libguestfs and
libvirt [bug 1263574] updates will fix this automatically
without any need to use --dcpath.

In any case, we cannot solve this in libguestfs.

Comment 5 Richard W.M. Jones 2015-12-13 15:16:28 UTC
BTW neither of the log files contains any useful information.  To
really diagnose if this is a duplicate, I need the output of the
'virt-v2v -v -x' command.

Comment 6 Michal Skrivanek 2016-01-07 14:12:28 UTC
based on comment #4, and assuming bug 1263574 and bug 1292437 get the backport approval, there is indeed no need to track this separately

Richard, if you're fine with that I would close as dupe of RHEV bug 1292096

Comment 7 Richard W.M. Jones 2016-01-07 14:19:37 UTC
Closing as duplicate per comment 6.

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