Copy-VMGuestFile – Failed to authenticate with the guest operating system using supplied credentials. [Linux]

This post was originally published on this site

I’m using PowerCLI to copy a file from the host operating system to the guest.

I’m successfully working with Windows VMs, but Linux VM is causing some problems. Note that this is the first time I’m working with a Linux VM, so I might be missing something obvious.

 

The command:

Get-Item “I:SWUpdatesmyInstaller.tar.gz” | Copy-VMGuestFile -Force -Destination /home/install/Desktop/installerTestmyInstaller.tar.gz -VM Ubuntu-20.4 -LocalToGuest -GuestUser xxx -GuestPassword yyy -Verbose

 

The error:

Copy-VMGuestFile – Failed to authenticate with the guest operating system using supplied credentials.

+ CategoryInfo          : NotSpecified: (:) [Copy-VMGuestFile], InvalidGuestLogin

+ FullyQualifiedErrorId : Client20_VmGuestServiceImpl_DirectoryExistsInGuest_ViError,VMware.VimAuttomation.ViCore.Cmdlets.Commands.CopyVMGuestFile

 

  1. Credentials are correct, I am able to log in to the VM using VMWare Workstation.
  2. (possible solution from different thread) VMTools appear to be installed and running on the system. If I run vmware-toolbox-cmd -v, I get: 11.0.5.11716 (build-15389592). ps aux | grep vmtoolsd shows two hits.
  3. (possible solution from different thread) I checked and /bin/bash is listed in /etc/shells.
  4. (possible solution from different thread) I tried wrapping the credentials in single quotes and double quotes, no difference.

 

Any other ideas what I could check?

Thanks in advance!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.