# Managed Object - GuestFileManager(vim.vm.guest.FileManager)

Property of
  GuestOperationsManager
See also
  FileTransferInformation, GuestAuthentication, GuestFileAttributes, GuestListFileInfo, VirtualMachine
Since
  vSphere API 5.0

## Managed Object Description

FileManager is the managed object that provides APIs to manipulate the guest operating system files.

Properties

Name | Type | Description
--- | --- | ---
None

Methods

Methods defined in this Managed Object
ChangeFileAttributesInGuest, CreateTemporaryDirectoryInGuest, CreateTemporaryFileInGuest, DeleteDirectoryInGuest, DeleteFileInGuest, InitiateFileTransferFromGuest, InitiateFileTransferToGuest, ListFilesInGuest, MakeDirectoryInGuest, MoveDirectoryInGuest, MoveFileInGuest

# ChangeFileAttributesInGuest(changeFileAttributes)

Changes the file attributes of a specified file inside the guest.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestFileManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual Machine to perform the operation on. Since vSphere API 5.0
auth P | GuestAuthentication | The guest authentication data. See GuestAuthentication. Since vSphere API 5.0
guestFilePath P | xsd:string | The complete path to the file to be copied in the guest. If the file points to an symbolic link, then the attributes of the target file are changed. Since vSphere API 5.0
fileAttributes P | GuestFileAttributes | Specifies the different file attributes of the guest file to be changed. See GuestFileAttributes. If any property is not specified, then the specific attribute of the file will be unchanged. Since vSphere API 5.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
FileFault | Thrown if there is a file error in the guest operating system.
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the operation fails because the guest authentication will not allow the operation.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="ChangeFileAttributesInGuest" type="vsan:ChangeFileAttributesInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="ChangeFileAttributesInGuestResponse"> <complexType/> </element>

# CreateTemporaryDirectoryInGuest(createTemporaryDirectory)

Creates a temporary directory.

Creates a new unique temporary directory for the user to use as needed. The user is responsible for removing it when it is no longer needed.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestFileManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual Machine to perform the operation on. Since vSphere API 5.0
auth P | GuestAuthentication | The guest authentication data. See GuestAuthentication. Since vSphere API 5.0
prefix P | xsd:string | The prefix to be given to the new temporary directory. Since vSphere API 5.0
suffix P | xsd:string | The suffix to be given to the new temporary directory. Since vSphere API 5.0
directoryPath* P | xsd:string | The complete path to the directory in which to create the new directory. If unset or an empty string, a guest-specific location will be used. Since vSphere API 5.0

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
xsd:string | The absolute path of the temporary directory that is created.

Faults

Type | Description
--- | ---
FileFault | Thrown if there is a file error in the guest operating system.
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the operation fails because the guest authentication will not allow the operation.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="CreateTemporaryDirectoryInGuest" type="vsan:CreateTemporaryDirectoryInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="CreateTemporaryDirectoryInGuestResponse"> <complexType> <sequence> <element name="returnval" type="xsd:string"/> </sequence> </complexType> </element>

# CreateTemporaryFileInGuest(createTemporaryFile)

Creates a temporary file.

Creates a new unique temporary file for the user to use as needed. The user is responsible for removing it when it is no longer needed.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestFileManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual Machine to perform the operation on. Since vSphere API 5.0
auth P | GuestAuthentication | The guest authentication data. See GuestAuthentication. Since vSphere API 5.0
prefix P | xsd:string | The prefix to be given to the new temporary file. Since vSphere API 5.0
suffix P | xsd:string | The suffix to be given to the new temporary file. Since vSphere API 5.0
directoryPath* P | xsd:string | The complete path to the directory in which to create the file. If unset, or an empty string, a guest-specific location will be used. Since vSphere API 5.0

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
xsd:string | The absolute path of the temporary file that is created.

Faults

Type | Description
--- | ---
FileFault | Thrown if there is a file error in the guest operating system.
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the operation fails because the guest authentication will not allow the operation.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="CreateTemporaryFileInGuest" type="vsan:CreateTemporaryFileInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="CreateTemporaryFileInGuestResponse"> <complexType> <sequence> <element name="returnval" type="xsd:string"/> </sequence> </complexType> </element>

# DeleteDirectoryInGuest(deleteDirectory)

Deletes a directory in the guest OS.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestFileManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual Machine to perform the operation on. Since vSphere API 5.0
auth P | GuestAuthentication | The guest authentication data. See GuestAuthentication. Since vSphere API 5.0
directoryPath P | xsd:string | The complete path to the directory to be deleted. Since vSphere API 5.0
recursive P | xsd:boolean | If true, all subdirectories are also deleted. If false, the directory must be empty for the operation to succeed. Since vSphere API 5.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
FileFault | Thrown if there is a file error in the guest operating system.
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the operation fails because the guest authentication will not allow the operation.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
NotADirectory | Thrown if the specified object is not a directory.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="DeleteDirectoryInGuest" type="vsan:DeleteDirectoryInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="DeleteDirectoryInGuestResponse"> <complexType/> </element>

# DeleteFileInGuest(deleteFile)

Deletes a file in the guest OS

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestFileManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual Machine to perform the operation on. Since vSphere API 5.0
auth P | GuestAuthentication | The guest authentication data. See GuestAuthentication. Since vSphere API 5.0
filePath P | xsd:string | The complete path to the file or symbolic link to be deleted. Since vSphere API 5.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
FileFault | Thrown if there is a file error in the guest operating system.
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the operation fails because the guest authentication will not allow the operation.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
NotAFile | Thrown if the specified object is not a file.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="DeleteFileInGuest" type="vsan:DeleteFileInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="DeleteFileInGuestResponse"> <complexType/> </element>

# InitiateFileTransferFromGuest(initiateFileTransferFromGuest)

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.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestFileManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual Machine to perform the operation on. Since vSphere API 5.0
auth P | GuestAuthentication | The guest authentication data. Since vSphere API 5.0
guestFilePath P | xsd: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. Since vSphere API 5.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
FileTransferInformation | A reference to FileTransferInformation.

Faults

Type | Description
--- | ---
FileFault | Thrown if there is a file error in the guest operating system.
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the operation fails because the guest authentication will not allow the operation.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="InitiateFileTransferFromGuest" type="vsan:InitiateFileTransferFromGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="InitiateFileTransferFromGuestResponse"> <complexType> <sequence> <element name="returnval" type="vsan:FileTransferInformation"/> </sequence> </complexType> </element>

# InitiateFileTransferToGuest(initiateFileTransferToGuest)

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.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestFileManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual Machine to perform the operation on. Since vSphere API 5.0
auth P | GuestAuthentication | The guest authentication data. See GuestAuthentication. Since vSphere API 5.0
guestFilePath P | xsd:string | 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. Since vSphere API 5.0
fileAttributes P | GuestFileAttributes | File attributes of the file that has to be created in the guest. See GuestFileAttributes. If any file attribute is not specified, then the default value of that property will be set for the file. Since vSphere API 5.0
fileSize P | xsd:long | Size of the file to transfer to the guest in bytes. Since vSphere API 5.0
overwrite P | xsd:boolean | If set, the destination file is clobbered. Since vSphere API 5.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
xsd:string | 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.

Faults

Type | Description
--- | ---
FileFault | Thrown if there is a file error in the guest operating system.
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the operation fails because the guest authentication will not allow the operation.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="InitiateFileTransferToGuest" type="vsan:InitiateFileTransferToGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="InitiateFileTransferToGuestResponse"> <complexType> <sequence> <element name="returnval" type="xsd:string"/> </sequence> </complexType> </element>

# ListFilesInGuest(listFiles)

Returns information about files or directories in the guest.

The results could be extremely large, so to minimize the size of the return value for cases where a UI only needs to show the first N results, the answer is batched. Files are returned in OS-specific (inode) order. If the directory is modified between queries, missing or duplicate results can occur.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestFileManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual Machine to perform the operation on. Since vSphere API 5.0
auth P | GuestAuthentication | The guest authentication data. See GuestAuthentication. Since vSphere API 5.0
filePath P | xsd:string | The complete path to the directory or file to query. Since vSphere API 5.0
index* P | xsd:int | Which result to start the list with. The default is 0. Since vSphere API 5.0
maxResults* P | xsd:int | The maximum number of results to return. The default is 50. Since vSphere API 5.0
matchPattern* P | xsd:string | A filter for the return values. Match patterns are specified using perl-compatible regular expressions. If matchPattern is unset, then the pattern '.*' is used. Since vSphere API 5.0

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
GuestListFileInfo | A GuestListFileInfo object containing information for all the matching files in the filePath and the number of files left to be returned.

Faults

Type | Description
--- | ---
FileFault |
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the operation fails because the guest authentication will not allow the operation.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="ListFilesInGuest" type="vsan:ListFilesInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="ListFilesInGuestResponse"> <complexType> <sequence> <element name="returnval" type="vsan:GuestListFileInfo"/> </sequence> </complexType> </element>

# MakeDirectoryInGuest(makeDirectory)

Creates a directory in the guest OS

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestFileManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual Machine to perform the operation on. Since vSphere API 5.0
auth P | GuestAuthentication | The guest authentication data. See GuestAuthentication. Since vSphere API 5.0
directoryPath P | xsd:string | The complete path to the directory to be created. Since vSphere API 5.0
createParentDirectories P | xsd:boolean | Whether any parent directories are to be created. Since vSphere API 5.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
FileAlreadyExists | Thrown if the specified object already exists.
FileFault | Thrown if there is a file error in the guest operating system.
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the directory cannot be created because the guest authentication will not allow the operation.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="MakeDirectoryInGuest" type="vsan:MakeDirectoryInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="MakeDirectoryInGuestResponse"> <complexType/> </element>

# MoveDirectoryInGuest(moveDirectory)

Moves or renames a directory in the guest.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestFileManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual Machine to perform the operation on. Since vSphere API 5.0
auth P | GuestAuthentication | The guest authentication data. See GuestAuthentication. Since vSphere API 5.0
srcDirectoryPath P | xsd:string | The complete path to the directory to be moved. Since vSphere API 5.0
dstDirectoryPath P | xsd:string | The complete path to the where the directory is moved or its new name. It cannot be a path to an existing directory or an existing file. Since vSphere API 5.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
FileFault | Thrown if there is a file error in the guest operating system.
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the operation fails because the guest authentication will not allow the operation.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="MoveDirectoryInGuest" type="vsan:MoveDirectoryInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="MoveDirectoryInGuestResponse"> <complexType/> </element>

# MoveFileInGuest(moveFile)

Renames a file in the guest.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the GuestFileManager used to make the method call.
vm P | ManagedObjectReference to a VirtualMachine | Virtual Machine to perform the operation on. Since vSphere API 5.0
auth P | GuestAuthentication | The guest authentication data. See GuestAuthentication. Since vSphere API 5.0
srcFilePath P | xsd:string | The complete path to the original file or symbolic link to be moved. Since vSphere API 5.0
dstFilePath P | xsd:string | The complete path to the where the file is renamed. It cannot be a path to an existing directory. Since vSphere API 5.0
overwrite P | xsd:boolean | If set, the destination file is clobbered. Since vSphere API 5.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
FileFault | Thrown if there is a file error in the guest operating system.
GuestComponentsOutOfDate | Thrown if the guest agent is too old to support the operation.
GuestOperationsFault | Thrown if there is an error processing a guest operation.
GuestOperationsUnavailable | Thrown if the VM agent for guest operations is not running.
GuestPermissionDenied | Thrown if the operation fails because the guest authentication will not allow the operation.
InvalidGuestLogin | Thrown if the the guest authentication information was not accepted.
InvalidPowerState | Thrown if the VM is not powered on.
InvalidState | Thrown if the operation cannot be performed because of the virtual machine's current state.
OperationDisabledByGuest | Thrown if the operation is not enabled due to guest agent configuration.
OperationNotSupportedByGuest | Thrown if the operation is not supported by the guest OS.
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TaskInProgress | Thrown if the virtual machine is busy.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="MoveFileInGuest" type="vsan:MoveFileInGuestRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="MoveFileInGuestResponse"> <complexType/> </element>