-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
rhel-9.6
-
None
-
No
-
Moderate
-
rhel-sst-virtualization
-
ssg_virtualization
-
None
-
False
-
-
None
-
None
-
None
-
None
-
-
x86_64
-
None
Description of problem
Virsh can't find compute resource when the method (IP or hostname)of adding the ESXi host in the vsphere client is inconsistent with the method (IP or hostname) of using the esxi host in vpx://
Version-Release number of selected component (if applicable):
libvirt-libs-10.9.0-1.el9.x86_64
How reproducible:
100%
Steps to Reproduce:
Preparation:
Add IP and hostname of ESXI host to /etc/hosts
# cat /etc/hosts ...... 10.73.114.27 dell-per760-20.lab.eng.pek2.redhat.com
Scenario1:
1.1 Add ESXi host with IP on vSphere client
1.2 virsh can find compute resource when ESXi host is added with IP on vSphere client and use IP in vpx://
# virsh -c vpx://non-admin%40vsphere.local@10.73.212.129/Folder/Datacenter/Cluster/10.73.114.27/?no_verify=1 Enter non-admin@vsphere.local's password for 10.73.212.129: Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh # quit
1.3 virsh can't find compute resource when ESXi host is added with IP on vSphere client but use hostname in vpx://
# virsh -c vpx://non-admin%40vsphere.local@10.73.212.129/Folder/Datacenter/Cluster/dell-per760-20.lab.eng.pek2.redhat.com/?no_verify=1 Enter non-admin@vsphere.local's password for 10.73.212.129: error: failed to connect to the hypervisor error: internal error: Could not find host system specified in '/Folder/Datacenter/Cluster/dell-per760-20.lab.eng.pek2.redhat.com/'
Scenario2:
2.1 Add ESXi host with hostname on vSphere client
2.1 virsh can find compute resource when ESXi host is added with hostname on vsphere client and use hostname in vpx://
# virsh -c vpx://non-admin%40vsphere.local@10.73.212.129/Folder/Datacenter/Cluster/dell-per760-20.lab.eng.pek2.redhat.com/?no_verify=1 Enter non-admin@vsphere.local's password for 10.73.212.129: Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh #
2.2 virsh can't find compute resource when ESXi host is added with hostname on vsphere client but use IP in vpx://
# virsh -c vpx://non-admin%40vsphere.local@10.73.212.129/Folder/Datacenter/Cluster/10.73.114.27/?no_verify=1 Enter non-admin@vsphere.local's password for 10.73.212.129: error: failed to connect to the hypervisor error: internal error: Could not find host system specified in '/Folder/Datacenter/Cluster/10.73.114.27/'
Actual results:
As above description
Expected results:
Fix the bug
Additional info:
Virsh can connect ESXi host with IP and hostname in esx://
# virsh -c esx://10.73.114.27/?no_verify=1 Enter username for 10.73.114.27 [root]: Enter root's password for 10.73.114.27: 2024-11-21 07:39:42.684+0000: 275318: info : libvirt version: 10.9.0, package: 1.el9 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2024-11-01-09:29:22, ) 2024-11-21 07:39:42.684+0000: 275318: info : hostname: dell-per660-05.lab.eng.pek2.redhat.com 2024-11-21 07:39:42.684+0000: 275318: warning : esxConnectToHost:662 : The server is in maintenance mode Welcome to virsh, the virtualization interactive terminal.Type: 'help' for help with commands 'quit' to quit virsh #
# virsh -c esx://dell-per760-20.lab.eng.pek2.redhat.com/?no_verify=1 Enter username for dell-per760-20.lab.eng.pek2.redhat.com [root]: Enter root's password for dell-per760-20.lab.eng.pek2.redhat.com: 2024-11-21 07:42:44.377+0000: 275500: info : libvirt version: 10.9.0, package: 1.el9 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2024-11-01-09:29:22, ) 2024-11-21 07:42:44.377+0000: 275500: info : hostname: dell-per660-05.lab.eng.pek2.redhat.com 2024-11-21 07:42:44.377+0000: 275500: warning : esxConnectToHost:662 : The server is in maintenance mode Welcome to virsh, the virtualization interactive terminal.Type: 'help' for help with commands 'quit' to quit virsh #