我试图使用libvirt文档中的信息连接到vSphere群集。
$ virsh -c "vpx://[email protected]/dc1/dc1-cluster-e01/dc1-vsphere-e04/?no_verify=1" Enter root's password for 10.51.4.11: error: internal error HTTP response code 400 for call to 'Login' error: failed to connect to the hypervisor
我似乎能够build立一个连接,但它与“HTTP代码400”失败。 如果我提供了不正确的密码,它会失败,出现“login凭据”错误,所以看起来像我正在获得一个连接,但由于其他原因失败。
Wireshark没有任何帮助,因为它都是通过SSL / TLS完成的。
任何想法的人?
解答:跳到我的答案下面关于特殊字符。
更新:15:21 28/02/11
仅供参考 – 我正在运行libvirt-0.8.3(在启用了ESX标志的情况下重新编译了Ubuntu软件包)。
当我把virsh进入debugging模式时,它返回这个:
[snip] Enter root's password for 10.51.4.11: 15:19:09.011: debug : do_open:1249 : driver 3 ESX returned ERROR 15:19:09.011: debug : virUnrefConnect:294 : unref connection 0x98aa8f8 1 15:19:09.011: debug : virReleaseConnect:249 : release connection 0x98aa8f8 error: internal error HTTP response code 400 for call to 'Login' error: failed to connect to the hypervisor
我在尝试login时看过了vmware hostd.log文件,而且报告了这个错误:
更新:10:26 02/03/11
[2011-03-02 10:24:16.415 26AF8B90 verbose 'Proxysvc Req16870'] New proxy client SSL(TCP(local=10.4.100.26:34001, peer=10.51.4.103:443)) [2011-03-02 10:24:16.430 26933B90 error 'SoapAdapter'] Client sent us an invalid SOAP request: at line number 8, not well-formed (invalid token)
我把问题发布在libvirt的邮件列表上,并得到了一个快速的回复。
事实certificate,libvirt目前不会在密码中转义特殊字符,并且在发生这种情况时,密码会有一个&
。
我现在可以使用&
而不是&
。 有一个修补程序来解决这个问题。
运行命令(不带最后一个斜杠):
$ virsh -c "vpx://[email protected]/dc1/dc1-cluster-e01/dc1-vsphere-e04?no_verify=1"
尝试:
$ virsh -c "vpx://[email protected]?no_verify=1"
要么:
$ virsh -c "vpx://10.51.4.11?no_verify=1" $ virsh -c "esx://10.51.4.11?no_verify=1"
也许这个链接将有所帮助? 他在Ubuntu上运行0.8.6 …