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...
Product: ovirt-engine
Classification: oVirt
Component: RFEs (Show other bugs)
Unspecified Unspecified
medium Severity low (vote)
: ---
: ---
Assigned To: Arik
Nisim Simsolo
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2015-08-12 04:50 EDT by Maor
Modified: 2018-07-06 11:27 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2018-07-06 11:27:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
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
  File "/usr/share/vdsm/v2v.py", line 383, in _import
V2VProcessError: Job u'4234467d-6fb2-8d32-609e-4ee38e2c4a47' process failed exit-code: 1, stderr: curl -q --insecure --user '<hidden>' --head --silent --url '
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:

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

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]
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.
Comment 3 Martin Tessun 2018-07-06 11:27:05 EDT
According to c#2 there seems to be a reasonable way for getting these errors.

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