Bug 781718

Summary: Unclear error message when wrong ESX url is passed
Product: [Community] Virtualization Tools Reporter: Tomas Von Veschler <tvvcox>
Component: libvirtAssignee: Gunannan Ren <gren>
Status: CLOSED NOTABUG QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, dallan, dyasny, dyuan, mzhan, rwu, tzheng, veillard, yupzhang, zpeng
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-19 07:45:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Tomas Von Veschler 2012-01-14 15:54:39 UTC
Description of problem:

If by accident instead of supplying the url of an ESX host, the url of the Virtualcenter is passed, the error message is unclear and the debug options are none.

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

virt-v2v-0.8.3-5.el6.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Run the command:

virt-v2v -ic esx://myhost.net/?no_verify=1 -o rhev -os rhevhost:/EXPORTS --network rhevm aldone8 
  
Actual results:

virt-v2v: Failed to connect to esx://myhost.net/?no_verify=1: libvirt error code: 8 , message invalid argument: Path has to specify the host system

Expected results:

Error, unable to connect to esx://myhost.net/?no_verify=1: The specified host system doesn't appear to be an ESX hypervisor host (maybe you're trying to connect to the VirtualCenter instead?)

Comment 2 Matthew Booth 2012-01-16 09:45:33 UTC
Reassigning to libvirt as this is a libvirt error message.

Comment 3 tingting zheng 2012-01-17 08:23:20 UTC
Hi,
I can not reproduce the bug with:
libvirt-0.9.9-1.el6.x86_64
virt-v2v-0.8.3-5.el6.x86_64

# virt-v2v -ic esx://10.66.6.48/?no_verify=1 -o rhev -os 10.66.90.115:/vol/v2v_auto/nfs_export -n rhevm test
virt-v2v: Failed to connect to esx://10.66.6.48/?no_verify=1: libvirt error code: 1, message: internal error 10.66.6.48 is neither an ESX 3.5, 4.x nor 5.x host

What's your libvirt version?thanks!

Comment 7 Dave Allan 2012-02-02 15:20:07 UTC
I think the error message displayed in comment 3 is a great improvement.  I do think the suggestion in the BZ description is helpful though, so I would add "(maybe you're trying to connect to the VirtualCenter instead?)" unless everybody feels that's unnecessary verbosity.

Comment 8 Gunannan Ren 2012-02-10 12:42:08 UTC
The error message is in two parts, "Failed to connect to esx://10.66.6.48/?no_verify=1" is from virt-v2v, the second part is the real reason for the failure that is from libvirt. I think the friendly warning(mentioned comment 7) should be better from upper tools rather than libvirt. 
But there are the case where the error is really caused by the failure of connection to ESX server, in this situation the friendly warning is not so good.
any idea?

Comment 9 Dave Allan 2012-05-17 14:56:46 UTC
Agreed that there are cases in which the user really is trying to connect to something that isn't an ESX host or VirtualCenter, but that's why it says *maybe* you're trying...

Comment 13 Gunannan Ren 2012-07-19 07:45:08 UTC
The current error message is pretty clear already, and I asked QE team, they are satisfied with the error message, so close it.

Comment 14 Dave Allan 2012-07-19 16:47:28 UTC
(In reply to comment #13)
> The current error message is pretty clear already, and I asked QE team, they
> are satisfied with the error message, so close it.

Ok, that satisfies my question in comment 7.