How do you upload a file to a virtual machine using the vSphere Web Services API and pyvmomi?
You call the `InitiateFileTransferToGuest` method with parameters including the VM object, guest credentials, destination path, file attributes, file size, and an overwrite flag. The method returns a URI that you access via a PUT request with the file content in binary format to complete the upload. This is demonstrated in the open-source code vSphereWebServicesAPI_Manage.py.
InitiateFileTransferToGuestfile uploadpyvmomiPUT request