On Thu, Feb 05, 2026 at 11:04:24 +0000, Richard W.M. Jones via Devel wrote:
> Libvirt vpx:// and esx:// URIs are quite obscure.  In particular it is
> very difficult to construct a correct path to a VMware resource.
> Basically you are iterating over VMware structures blindly with no way
> to know what your choices are at each level in the path.
> 
> This commit doesn't directly address this.  It's still difficult.  But
> at least let's add the true path choices to the debug output so
> someone could in theory use 'LIBVIRT_DEBUG=1' to find out what
> possible choices exist at a path level.
> 
> For example this command fails because the label (which looks like an
> IPv6 address, but is really a label) should use "::" instead of ":0:":
> 
>   LIBVIRT_DEBUG=1 virsh -c 
> 'vpx://root@.../data/aaaa:52:0:49e0:2eea:7fff:fee6:eca0/?no_verify=1'
> 
> In the debugging output we now print:
> 
>   2026-02-05 10:58:25.421+0000: 1528876: debug : 
> esxVI_LookupManagedObjectHelper:4956 : comparing path element 
> 'aaaa:52:0:49e0:2eea:7fff:fee6:eca0' with candidate name 
> 'aaaa:52::49e0:2eea:7fff:fee6:eca0'
>   2026-02-05 10:58:25.421+0000: 1528876: error : 
> esxVI_Context_LookupManagedObjectsByPath:1098 : internal error: Could not 
> find compute resource specified in '/data/aaaa:52:0:49e0:2eea:7fff:fee6:eca0/'
> 
> In an ideal world we should improve the error message to show the
> possible choices, but the way the code is structured makes that
> prohibitive.
> 
> Related: https://issues.redhat.com/browse/RHEL-145080
> ---
>  src/esx/esx_vi.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Peter Krempa <[email protected]>

Reply via email to