VMware Cloud Community
malabelle
Enthusiast
Enthusiast

Copy-VMGuestFile 'Failed to resolve host

Hi,

I'm trying to copy a file on Vm from the command

Copy-VMGuestFile -Source c:\TEMP\PowerCLI\file.txt -Destination c:\TEMP\PowerCLI\file.txt -VM vserver01 -LocaltoGuest -HostUser root -HostPassword "rootpassword" -GuestUser "domain\username" -GuestPassword "domainpassword"

it says:

Copy-VMGuestFile : 08/04/2011 4:15:23 PM    Copy-VMGuestFile        While performing operation 'Connect to host service 'https://esxhost12.domain.tld/sdk' at port 902' the following error occured: 'Failed to resolve host'At line:1 char:17

    + CategoryInfo          : OperationStopped: (:) [Copy-VMGuestFile], VimException

    + FullyQualifiedErrorId : Client20_VmGuestServiceImpl_VixWaitForJob_VixError,VMware.VimAutomation.ViCore.Cmdlets.Commands.CopyVMGuestFile

I tried ping the esx host, worked

ping esxhost12.domain.tld

Pinging esxhost12.domain.tld [172.20.24.62] with 32 bytes of data:

Reply from 172.20.24.62: bytes=32 time=4ms TTL=64

i tried telnet the esx host on the port 902, worked

telnet esxhost12.domain.tld 902

220 VMware Authentication Daemon Version 1.10: SSL Required, ServerDaemonProtocol:SOAP, MKSDisplayProtocol:VNC , VMXARGS supported

any idea?

It works on certain VM/ESX

vExpert '16, VCAP-DCA, VCAP-DCD
0 Kudos
2 Replies
LucD
Leadership
Leadership

Are you running this in a 32-bit PowerCLI session ?

All scripts that use VIX, like the Copy-VMGuestFile cmdlet, need to run in a 32-bit context.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

malabelle
Enthusiast
Enthusiast

64bits.

I tried again after, and it worked... Frankly, no idea what happenned... Maybe the network guy, played with something without telling me after...

thanks

vExpert '16, VCAP-DCA, VCAP-DCD
0 Kudos