【问题标题】:VMWare PowerCli - issue in connecting the remote ESX host - ResourceUnavailable: (:) [Get-VMHost], ViServerConnectionExceptionVMWare PowerCli - 连接远程 ESX 主机时出现问题 - ResourceUnavailable: (:) [Get-VMHost], ViServerConnectionException
【发布时间】:2019-01-25 13:26:55
【问题描述】:

我正在尝试使用 PowerCli 版本 6.5 release1 连接远程 ESX 主机以从 Windows 10 系统获取所有虚拟机。 在执行 connect-VIServer 时,我没有得到任何输出或错误。但是在执行 get-VMHost 时,我收到以下错误消息。 Vsphere 客户端可以使用相同的凭据连接到 ESX 主机。请帮助解决 powercli 问题。

PS C:\> Connect-VIServer 10.44.6.45
PS C:\> Get-VMHost
Get-VMHost : 1/25/2019 6:51:43 PM       Get-VMHost              You are not currently connected to any servers. Please connect first
using a Connect cmdlet.
At line:1 char:1
+ Get-VMHost
+ ~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [Get-VMHost], ViServerConnectionException
    + FullyQualifiedErrorId : Core_BaseCmdlet_NotConnectedError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVMHost

PS C:\>

【问题讨论】:

  • 使用 -verbose 运行 connect-VIserver 并粘贴内容。

标签: vmware powercli esx


【解决方案1】:

根据您的代码,我不相信您已连接到 10.44.6.45 主机。我希望看到连接主机的响应以及用于建立该连接的凭据,而您的代码根本没有响应。

您可能想尝试以下方法:

$creds = Get-Credential # Note: This will prompt you to enter your credentials
Connect-VIServer -Server 10.44.6.45 -Credential $creds

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-12-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多