Guest File Manager Initiate File Transfer From Guest
Initiates an operation to transfer a file from the guest.
Obtains a reference to FileTransferInformation 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 FileTransferInformation 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 (VirtualMachine) -> runtime (VirtualMachineRuntimeInfo) -> host (HostSystem) -> config (HostConfigInfo) -> certificate.
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case GuestFileManager/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.3.0 APIs.
Show optional properties
{
"vm": {},
"auth": {
"interactiveSession": false
},
"guestFilePath": "string"
}
{
"vm": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"auth": {
"_typeName": "string",
"interactiveSession": false
},
"guestFilePath": "string"
}
GuestAuthentication is an abstract base class for authentication in the guest.
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.
A reference to FileTransferInformation.
{
"_typeName": "string",
"attributes": {
"_typeName": "string",
"modificationTime": "string",
"accessTime": "string",
"symlinkTarget": "string"
},
"size": 0,
"url": "string"
}
Different attributes for a guest file.
- Check GuestPosixFileAttributes for Posix guest files.
- Check GuestWindowsFileAttributes for Windows guest files.
Total size of the file in bytes.
Specifies the URL to which the user has to send HTTP GET request.
Multiple GET requests cannot be sent to the URL simultaneously. URL will become invalid once a successful GET request is sent.
The host part of the URL is returned as '*' if the hostname to be used is the name of the server to which the call was made. For example, if the call is made to esx-svr-1.domain1.com, and the file is available for download from https://esx-svr-1.domain1.com/guestFile?id=1&token=1234
, the URL returned may be https://*/guestFile?id=1&token=1234
. The client replaces the asterisk with the server name on which it invoked the call.
The URL is valid only for 10 minutes from the time it is generated. Also, the URL becomes invalid whenever the virtual machine is powered off, suspended or unregistered.
GuestOperationsFault: if there is an error processing a guest operation.
GuestOperationsUnavailable: if the VM agent for guest operations is not running.
InvalidPowerState: if the VM is not powered on.
InvalidState: if the operation cannot be performed because of the virtual machine's current state.
TaskInProgress: if the virtual machine is busy.
GuestPermissionDenied: if the operation fails because the guest authentication will not allow the operation.
InvalidGuestLogin: if the the guest authentication information was not accepted.
FileFault: if there is a file error in the guest operating system.
GuestComponentsOutOfDate: If the guest agent is too old to support the operation.
OperationNotSupportedByGuest: If the operation is not supported by the guest OS.
OperationDisabledByGuest: If the operation is not enabled due to guest agent configuration.
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}