Search
Plugins > vCenter Server 5.5.3 > VcGuestFileManager > initiateFileTransferFromGuest

Method initiateFileTransferFromGuest(VcVirtualMachine vm, VcGuestAuthentication auth, String guestFilePath)

Initiates an operation to transfer a file from the guest.

Obtains a reference to VcFileTransferInformation object for the file transfer operation. The information object contains a URL to the file inside the guest to be transferred to the client.
See VcFileTransferInformation for information on how to use the information object. If the power state of the Virtual Machine is changed when the file transfer is in progress, or the Virtual Machine is migrated, then the transfer operation is aborted.

In order to ensure a secure connection to the host when transferring a file using HTTPS, the X.509 certificate for the host must be used to authenticate the remote end of the connection. The certificate of the host that the virtual machine is running on can be retrieved using the following fields: vm (VcVirtualMachine) -> runtime (VcVirtualMachineRuntimeInfo) -> host (VcHostSystem) -> config (VcHostConfigInfo) -> certificate.

Returns

VcFileTransferInformation

Arguments

Name Type Description
vm VcVirtualMachine Virtual Machine to perform the operation on.
auth VcGuestAuthentication The guest authentication data.
guestFilePath String The complete path to the file inside the guest that has to be transferred to the client. It cannot be a path to a directory or a symbolic link.