Copy-VMGuestFile error While performing operation ‘Connect to host service ‘https://vc01/sdk’ at port 902′ the following error occured: ‘Failed to resolve host’


Copy-VMGuestFile : 4/11/2012 1:15:54 PM    Copy-VMGuestFile        While performing operation ‘Connect to host service
https://xyz/sdk’ at port 902′ the following error occured: ‘Failed to resolve host’
At line:1 char:17
+ Copy-VMGuestFile <<<<  -LocalToGuest -Source C:\file1.txt -Destination c:\ -VM vmtest01 -GuestUser Administrator -GuestPassword “password”
+ CategoryInfo          : OperationStopped: (:) [Copy-VMGuestFile], VimException
+ FullyQualifiedErrorId : Client20_VmGuestServiceImpl_VixWaitForJob_VixError,VMware.VimAutomation.ViCore.Cmdlets.C
ommands.CopyVMGuestFile

I got that error while trying to upload a file to a VM. I was connected to vc using it’s name vc01. When i have disconnected and connected again this time using FQDN vc01.mydomain.local it worked. So the reason while it was failing is because i was not connecting using FQDN of the VC server.

What is worth mentioning, in order to run cmdlets like copy-vmguestfile, make sure you are running powershell in 32bit, as it will not work under 64bit.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s