1

我正在尝试重构旧的 perl 代码以支持一些新的仅支持 IPV6 的主机。

在测试基本的“ connect.pl”脚本时,它失败了

不支持的 IP 地址格式:

#/usr/lib/vmware-vcli/apps/general/connect.pl --url https://fe80::b6b5:2fff:fe5a:c5d8:443/sdk --username root --password pw
Unsupported IP address format

我还编写了一个小测试脚本来练习 Util::connect,它以同样的方式失败。

注意事项:

我正在使用VMware-vSphere-Perl-SDK-5.1.0-780721.

在我的场景中,ESXi主机IPV6只运行,客人IPV4只运行。

4

2 回答 2

1

你这里有两个问题。

  1. URL 中的 IPv6 文字地址需要放在括号中。
  2. 您的链接本地地址缺少接口标识符。

使用正确的接口标识符在括号中指定链接本地地址。例如:

https://[fe80::b6b5:2fff:fe5a:c5d8%eth0]:443/sdk
于 2013-06-28T20:28:12.450 回答
0

The correct answer here is that, for unknown reasons, the API checks for link-local "fe80" addresses, and errors if it sees them.

connect.pl (which is sample code provided by VMware) works just fine with a global-scoped IPV6 address.

于 2013-07-11T19:09:11.703 回答