Guest File Manager Initiate File Transfer To Guest
Initiates an operation to transfer a file to the guest.
Obtains a URL to the file inside the guest to be transferred from the client. The user should send a HTTP PUT request specifying the file content in the body of the request. Multiple PUT request cannot be sent to the URL simultaneously. URL will be invalidated after a successful PUT request is sent. 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.2.0 APIs.
{
"vm": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"auth": {
"_typeName": "string",
"interactiveSession": false
},
"guestFilePath": "string",
"fileAttributes": {
"_typeName": "string",
"modificationTime": "string",
"accessTime": "string",
"symlinkTarget": "string"
},
"fileSize": 0,
"overwrite": false
}
GuestAuthentication is an abstract base class for authentication in the guest.
The complete destination path in the guest to transfer the file from the client. It cannot be a path to a directory or a symbolic link.
Different attributes for a guest file.
- Check GuestPosixFileAttributes for Posix guest files.
- Check GuestWindowsFileAttributes for Windows guest files.
Size of the file to transfer to the guest in bytes.
If set, the destination file is clobbered.
A URL to which the user has to send a PUT request. 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 can be uploaded to 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"
}
]
}