Move Guest Filesystem Files
Renames a file in the guest.
if you do not have all of the privileges described as follows: - The resource VirtualMachine referenced by the parameter vm requires VirtualMachine.GuestOperations.Modify.
Request
URLURL
Path Parameters
Path Parameters
Virtual Machine to perform the operation on. The parameter must be an identifier for the resource type: VirtualMachine.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
This is a request body class for an operation.
{
"credentials": {
"interactive_session": false,
"type": "USERNAME_PASSWORD"
},
"new_path": "string",
"path": "string"
}
The complete path to the new file. It cannot be a path to an existing directory.
The complete path to the original file or symbolic link to be moved.
If true, the destination file is overwritten. If unset, the destination file is not overwritten.
Authentication
Errors
Errors
com.vmware.vapi.std.errors.already_exists : if the newPath already exists and overwrite is false. | com.vmware.vapi.std.errors.invalid_argument : if path is not a file. The value of com.vmware.vapi.std.errors.Error#data will contain all the fields defined in the FileErrorDetails providing additional information about the failure. if path is too long. The value of com.vmware.vapi.std.errors.Error#data will contain all the fields defined in the FileErrorDetails providing additional information about the failure. if newPath is too long. The value of com.vmware.vapi.std.errors.Error#data will contain all the fields defined in the FileErrorDetails providing additional information about the failure. | com.vmware.vapi.std.errors.not_allowed_in_current_state : if the virtual machine not running. | com.vmware.vapi.std.errors.unsupported : if the operation is not supported by the VMware Tools in the guest operating system. if the operation is disabled by the VMware Tools in the guest operating system.
com.vmware.vapi.std.errors.unauthorized : if a path cannot be accessed. if a path cannot be renamed because the guest authentication will not allow the operation.
com.vmware.vapi.std.errors.not_found : if the virtual machine is not found. if path does not exist. The value of com.vmware.vapi.std.errors.Error#data will contain all the fields defined in the FileErrorDetails providing additional information about the failure. if the parent directory of newPath does not exist. The value of com.vmware.vapi.std.errors.Error#data will contain all the fields defined in the FileErrorDetails providing additional information about the failure.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
PowerCLI Client SDK All Parameters Example
cURL Command
Vendor Extensions
x-vmw-doc-operation: move