Bug 1252772 - [RFE][virt-v2v] When there is a failure to import a VM using virt-v2v oVirt does not seem to reflect the error from VDSM
[RFE][virt-v2v] When there is a failure to import a VM using virt-v2v oVirt d...
Status: NEW
Product: ovirt-engine
Classification: oVirt
Component: RFEs (Show other bugs)
---
Unspecified Unspecified
medium Severity low (vote)
: ---
: ---
Assigned To: Arik
Pavel Stehlik
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-12 04:50 EDT by Maor
Modified: 2016-07-18 09:33 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
ylavi: ovirt‑future?
ylavi: planning_ack?
ylavi: devel_ack?
ylavi: testing_ack?


Attachments (Terms of Use)
engine log (266.32 KB, text/plain)
2015-08-12 04:50 EDT, Maor
no flags Details
vdsm (18.26 MB, text/plain)
2015-08-12 04:53 EDT, Maor
no flags Details

  None (edit)
Description Maor 2015-08-12 04:50:58 EDT
Created attachment 1061882 [details]
engine log

Description of problem:
Trying to import a specific VM using VMware fails, though in the log I can only seem to find the following error (see [1])
The question is how can I use virt-v2v with debugging enabled through oVirt, and is there a way for oVirt to reflect the message got from virt-v2v

Thread-7303::ERROR::2015-08-12 11:36:09,978::v2v::355::root::(_run) Job u'4234467d-6fb2-8d32-609e-4ee38e2c4a47' failed
Traceback (most recent call last):
  File "/usr/share/vdsm/v2v.py", line 350, in _run
    self._import()
  File "/usr/share/vdsm/v2v.py", line 383, in _import
    self._proc.stderr.read(1024)))
V2VProcessError: Job u'4234467d-6fb2-8d32-609e-4ee38e2c4a47' process failed exit-code: 1, stderr: curl -q --insecure --user '<hidden>' --head --silent --url 'https://10.35.4.144/folder/chichaDerezVM/chichaDerezVM-000001-flat.vmdk?dcPath=o
virt&dsName=datastore1'
HTTP/1.1 404 Not Found
Date: Wed, 12 Aug 2015 08:35:27 GMT
Set-Cookie: vmware_soap_session="35967553b5d9a62d0df18bf6e5093a2081bb4416"; Path=/; HttpOnly; Secure; 
Connection: close
Content-Type: text; charset=plain
Content-Length: 0

virt-v2v: error: vcenter: URL not found: 
https://10.35.4.144/folder/chichaDerezVM/chichaDerezVM-000001-flat.vmdk?dcPath=ovirt&dsName=datastore1

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Try to import a VM using virt-v2v
2.
3.

Actual results:
VM fail to be imported with an audit log message indicating 
"Failed to import Vm ...."

Expected results:
We should have a more informative message indicating also the reason why the VM could not be imported

Additional info:
Comment 1 Maor 2015-08-12 04:53:43 EDT
Created attachment 1061884 [details]
vdsm
Comment 2 Arik 2015-08-13 08:25:29 EDT
(In reply to Maor from comment #0)
There is no need to enable debugging in virt-v2v for that, we get errors that happen in the middle of the conversion without debugging mode.

Note that we parse the output of virt-v2v. So we get the description of errors from virt-v2v as text, therefore we decide not to show it in the audit log. So  audit log only shows that the conversion failed and to see why you should look for it in the engine/vdsm log.

I believe that if we ever change the API with virt-v2v to be based on codes for errors instead of getting it as text, then we will be able to map codes to presentable messages in audit logs.

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