vmgr.nsm connection to VMware vCenter server

Started by pvo, May 21, 2020, 01:54:46 PM

Previous topic - Next topic

pvo

I've tried to use vmgr.nsm. It works fine with ESXi hypervisors but when try to connect to a vCenter server it fails with following error:
2020.05.21 11:11:47.611 *W* [                   ] VMGR: Unable to add connection URL "esx://[email protected]/?no_verify=1" for connection name "vcenter"

The configuration is following:
[vmgr:vcenter]
Url = esx://[email protected]/?no_verify=1
Login = root
Password = XXX



The password in the real configuration is different but it is OK. I can login with this login and password to vCenter Web UI.

Did I do something wrong or supports vmgr.nsm ESXi hypervisors only?

Tatjana Dubrovica

Currently the bet option to find problems in credentials is to use virsh tool. Something like this:
virsh -c esx: //root@vcenter. mydomain.local/?no_verify=1 list

This tool will give more information about the problem that occurred wile connection.

pvo

The answer is as I expected.

error: failed to connect to the hypervisor
error: internal error: Expecting 'vcenter.mydomain.local' to be a ESX(i) host but found a vCenter/VPX host


Thank you for your help.

pvo

#3
This works fine:
virsh -c vpx://[email protected]/Datacenter_name/Cluster_name/ESXi_Server_name?no_verify=1

But it means I need one connection for each ESXi server and not one common connection for whole Cluster or for whole vCenter.

Filipp Sudanov

libvirt claims that it can connect to vcencter, not only particular ESXi servers.

Here's a video that seems to be explaining how this is done: https://www.youtube.com/watch?v=n3XJ0X1l9DU

pvo

The video uses the same URL format I described above. The URL connects to vCenter server, but the connection is restricted to a single ESXi server.

Following is written in the libvirt documentation https://libvirt.org/drvesx.html
"A vpx:// connection is currently restricted to a single ESX server. This might be relaxed in the future. The path part of the URI is used to specify the datacenter and the ESX server in it. If the ESX server is part of a cluster then the cluster has to be specified too."

This means that if I list all VMs I see only the VMs on this single ESXi server. If a running VM is moved to another ESXi server in the same cluster it disappears form the list and appears in the list for  the other ESXi server which needs another connection to the same vCenter but with different path. I'm not sure it will be possible to identify, that it is the same VM and move the DCIs instead of deleting old and creating new ones.

I know than this is property of livirt and it must be changed there but it limits the VMware monitoring in NetXMS.

Victor Kirhenshtein

Actually we already decided that we have to move from libvirt to direct interaction with VMWare API (as we already did for XEN) - it's just question of available time and resources.

Best regards,
Victor

it_user1

Quote from: Victor Kirhenshtein on May 27, 2020, 07:26:05 AM
Actually we already decided that we have to move from libvirt to direct interaction with VMWare API (as we already did for XEN) - it's just question of available time and resources.

Best regards,
Victor

hi, with version 3.3 is possible use vmware api? if yes where i can find documentation?

thanks

Andrea

Filipp Sudanov

Working with VMWare API in in future plans only. It's not implemented yet.