NAME

fileaccess.pl - Allow the get and put operations on datastore and configuration files and put operation on the /tmp directory.


SYNOPSIS

fileaccess.pl --operation<put|get|browse>[options]


DESCRIPTION

This VI Perl command-line utility 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.


OPTIONS

GENERAL OPTIONS

operation
 Operation to be performed.  Must be one of the following:
  I<get> (Retrieving the datastore and configuration files.),
  I<put> (Putting the files under datastore and tmp directory, modifying the configuration files),
  I<browse> (Displaying all the accessible datastore and configuration files.),
datacentername

Optional. Name of the Datacenter. Mandatory argument for get and put operations on datastore files.

datastorename

Optional. Name of the Datastore. Mandatory argument for get and put operations on datastore files.

filetype

Optional. Must be [datastore | config | tmp]

   Value must be datastore for the get and put operations on datastore files.
   Value must be config for the get and put operations on configuration files.
   Value must be tmp for put operation on /tmp directory.
remotepath

Optional. Remote path of the datastore file. Mandatory argument for the get and put operations on datastore files

remotefilename

Optional. Configuration file name. Mandatory argument for the get and put operations on configuration files

localpath

Optional. Localpath to save the extracted log.


EXAMPLES

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


SUPPORTED PLATFORMS

All operations work with VMware VirtualCenter 2.5.

All operations work with VMware ESX Server 3.5.