Configuration
Files
OVF Tool has many options. Rather than
repeatedly entering long commands on the command line, you can create a
configuration file. A configuration file uses the following syntax:
option1=value ... #comment optionN=value
The following is an example of a configuration
file:
proxy=http://proxy.example.com datastore=storage-test42 # Comment on something locale=dk
You can create local or global configuration
files. A local configuration file has the
.ovftool
suffix and is read in
the folder from which you invoke OVF Tool. A global configuration file is per
user.
On pre-Vista Windows, the global configuration
file is read from the following location:
C:\Documents and
Settings\$USERNAME\VMware\ovftool.cfg
On post-Vista Windows, the global configuration
file is read from the following location:
C:\Users\$USERNAME\AppData\Roaming\VMware\ovftool.cfg
On Linux and Mac, the global configuration file is
read from the following location:
$HOME/.ovftool (example: ~/.ovftool)
When using configuration files, globally defined
options are overwritten by locally defined and command-line options. Locally
defined options are overwritten by command-line options. Note: there are some
variables, such as proxy, that do not allow you to specify the options in
multiple places. If the ovftool stops running with the error, “already
exists
“, it is very likely that you have
specified options on the command line and in the configuration file.
You can use the
ovftool --help config
command to get information about how to use a configuration file. In addition,
the current contents of the global configuration file as well as any local
configuration file is shown.