When attempting to transfer files to a virtual machine using the Copy-VMGuestFile PowerCLI cmdlet connected via vCenter Server, the operation fails with errors such as 404 Not Found. In the virtual machine log, requests for GuestOps.InitiateFileTransferToGuest are received.
vmware.log
YYYY-MM-DDTHH:MM:SS In vmx - VigorTransportProcessClientPayload: opID=xxxx seq=xxxx: Receiving GuestOps.InitiateFileTransferToGuest request. YYYY-MM-DDTHH:MM:SS In vcpu-1 - VigorTransport_ServerSendResponse opID=xxxx seq=xxxx: Completed GuestOps.InitiateFileTransferToGuest request.
Normally, when the file transfer successfully begins, the following PUT request is recorded in the ESXi host envoy-access.log.
envoy-access.log
YYYY-MM-DDTHH:MM:SS In envoy-access: PUT /guestFile?id=xxxx HTTP/1.1 200 via_upstream - xxxx xxxx xxxx xxxx xxxx x.x.x.x:XXXXX TLSv1.2 y.y.y.y:443 127.0.0.1:ZZZZZ - 127.0.0.1:8309 -
However, when this issue occurs, there is no corresponding PUT request recorded in the ESXi host envoy-access.log.
VMware vSphere ESXi 8.0
VMware PowerCLI
The Copy-VMGuestFile cmdlet initiates a file transfer request through vCenter Server. After the guest operating system prepares for the transfer, the actual file data is sent directly from the machine running PowerCLI to the ESXi host where the virtual machine resides via HTTPS.
If the machine running PowerCLI cannot communicate directly with the ESXi host due to network configurations such as name resolution failures, firewalls, or proxy settings, the file transfer will fail.
Verify the network connectivity between the machine running PowerCLI and the destination ESXi host.
Ensure that the machine running PowerCLI can correctly resolve the FQDN of the ESXi host to its IP address.
Check if any firewalls or proxy servers are blocking traffic on HTTPS port 443 from the PowerCLI machine to the ESXi host.
Japanese version: PowerCLI で Copy-VMGuestFile コマンドレットを使用してファイル転送ができない(431329)