I am trying to track this benign error I keep getting when I invoke the 'Copy-VMGuestFile' commandlet/ The code is simple
If ($strVMRole -ne 'Standard') {
My-Logger "Copy role configuration files to Virtual Machine '$strVMName' ..."
Copy-VMGuestFile -Source "$PostIntallationRepo\$strVMPrepDir\*" -Destination "C:\$strVMPrepDir\" -VM $strVMName -LocalToGuest -GuestCredential $DCLocalCredential -Force
}
It just copies a folder/files from my PC to a VM. I am using the local administrator credential versus the domain version of an administrator. I double-check all the variables to ensure they are defined and valid. In a matter of fact, from when I can tell, all the folder/files that need to be on VM were successfully copied over. However, I keep getting this error, (see below) makes no sense as the template I used for the VM are recent, and it is using the latest VMtools etc.
[01-10-2021_01:43:06] Copy role configuration files to Virtual Machine 'SCA1' ...
WARNING: The guest OS for the virtual machine 'SCA1' is unknown. The operation may fail.
Copy-VMGuestFile : 1/10/2021 1:46:32 AM Copy-VMGuestFile A general system error occurred: vix error codes = (3016, 0).
At D:\VMware\WindowsVM 6.ps1:391 char:5
+ Copy-VMGuestFile -Source "$PostIntallationRepo\$strVMPrepDir\*" - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Copy-VMGuestFile], SystemError
+ FullyQualifiedErrorId : Client20_VmGuestServiceImpl_DirectoryExistsInGuest_ViError,VMware.VimAutomation.ViCore.Cmdle
ts.Commands.CopyVMGuestFile
WARNING: The guest OS for the virtual machine 'SCA1' is unknown. The operation may fail.
Not a clue as to what "The Guest OS for the VM is unknown, as I see it from vCenter dashboard. And what is causing this vix error code? Or perhaps which / where the log on the VM I can get more info . Thank you and any feedback would be appreciated