fileaccess.pl - Allows get and put operations on datastore and configuration files and put operation on the /tmp directory
fileaccess.pl --operation <put|get|browse> [options]
This command provides an interface for get and put operations on the datastore and configuration files and put operation on the /tmp directory. The Basic operations are:
Retrieve the datastore and configuration files.
Put the files under datastore directory.
Put the modified configuration files.
Put the files under /tmp directory.
Display all the accessible datastore and configuration files.
Operation to be performed. Must be one of the following:
get – Retrieve the datastore and configuration files.
put – Put files under the datastore and tmp directories, modifying the configuration files.
browse – Display all the accessible datastore and configuration files.
Optional. Name of the Datacenter. Mandatory argument for get and put operations on datastore files.
Optional. Name of the Datastore. Mandatory argument for get and put operations on datastore files.
Optional. Value must be one of the following:
datastore – For the get and put operations on datastore files.
config – For the get and put operations on configuration files.
tmp – For the put operation on the /tmp directory.
Optional. Remote path of the datastore file. Mandatory argument for the get and put operations on datastore files
Optional. Configuration file name. Mandatory argument for the get and put operations on configuration files
Optional. Localpath to save the extracted log.
To retrieve the datastore file
fileaccess.pl --url <https://<IP Address>:<Port>/sdk/vimService> --username myuser --password mypassword --operation get --localpath "C:/tmp/vm.vmx" --remotepath "vm/vm.vmx" --filetype datastore --datastorename <datastore name> -- datacentername <datacenter name>
To retrieve the configuration file
fileaccess.pl --url <https://<IP Address>:<Port>/sdk/vimService> --username myuser --password mypassword --operation get --localpath "C:/tmp/vm.vmx" --remotefilename <name of configuration files> --filetype config
To put the datastore file
fileaccess.pl --url <https://<IP Address>:<Port>/sdk/vimService> --username myuser --password mypassword --operation put --localpath "C:/tmp/vm.vmx" --remotepath "vm/vm.vmx" --filetype datastore --datastorename <datastore name> -- datacentername <datacenter name>
To put the configuration file
fileaccess.pl --url <https://<IP Address>:<Port>/sdk/vimService> --username myuser --password mypassword --operation put --localpath "C:/tmp/filename" --remotefilename <name of configuration files> --filetype config
To put the file under tmp directory
fileaccess.pl --url <https://<IP Address>:<Port>/sdk/vimService> --username myuser --password mypassword --operation put --localpath "C:/tmp/filename" --remotefilename <name of configuration files> --filetype tmp
To display the accessible datastore files.
fileaccess.pl --url <https://<IP Address>:<Port>/sdk/vimService> --username myuser --password mypassword --operation browse --filetype datastore --remotepath vm --datastorename <Datastore name> --datacentername <Datacenter name>
To display the accessible configuration files.
fileaccess.pl --url <https://<IP Address>:<Port>/sdk/vimService> --username myuser --password mypassword --operation browse --filetype config