【问题标题】:Invoke-vmscript fails to execute with unexpected error occurred on a receieveInvoke-vmscript 无法执行,接收时出现意外错误
【发布时间】:2015-03-12 16:39:32
【问题描述】:

在 linux 机器上运行以下命令,但失败并出现以下错误:

Invoke-VMScript <<<<  -VM $machine.Name -ScriptType Bash -GuestUser $UserName -GuestPassword $Password -ScriptText $cmd -ToolsWaitSecs 400

错误:

Invoke-VMScript        The underlying connection was closed: An unexpected error occurred on a receive.
    + CategoryInfo          : NotSpecified: (:) [Invoke-VMScript], ViError
    + FullyQualifiedErrorId : Client20_VmGuestServiceImpl_DownloadFileFromGuest_DownloadError,VMware.VimAutomation.ViCore.Cmdlets.Commands.InvokeVmScript

【问题讨论】:

    标签: powershell vmware powercli


    【解决方案1】:

    断开连接并重新连接到 VI 服务器,这应该可以解决问题。 Disconnect-VIServer -Server * -Confirm:$false -Force Connect-VIServer -Server $vcIP -Protocol https -User $vcUser -Password $vcPW

    【讨论】:

    • 谢谢。这解决了问题
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-15
    • 1970-01-01
    相关资源
    最近更新 更多