Using Ovftool

Ovftool can be pretty awesome, but it can also be very difficult to use. I seem to have a love/hate relationship with it.

Here I will go over some common issues I have with the tool. I’ve only tested on the Windows version of ovftool.

As of VMware ovftool 4.3.0 (build-14746126), the local configuration file is now working. There’s also a --ConfigFile <myfile.cfg> that can be used to specify a configuration file. There’s a bug using the .ovftool/.option file as a local configuration file. It’s been reported and hopefully will be fixed soon.

Command line options

First up, get friendly with ovftool --help

The target parameter can get complicated, but to deploy to vCenter, use the format:

vi//<username@domain>:<password>@<vCenter FQDN or IP>/<Datacenter name>/host/<cluster name>.

You can omit the password, and it will prompt you for it. vi://administrator@vsphere.local:VMware1!

Command line options that have multiple values, or spaces in their name need double quotes. ie: --prop:nsx_role="nsx-manager nsx-controller".

If you don’t use double quotes, you’ll get some seemingly random error such as Error: Unexpected option: --prop:nsx_netmask_0=

See below for the full working command.

c:\lab\ovftool>ovftool --name=nsx-manager --X:injectOvfEnv --X:logFile=ovftool.log --allowExtraConfig --datastore=vsanDatastore --vmFolder=Infrastructure --network="VM Network" --acceptAllEulas --noSSLVerify --diskMode=thin --powerOn --prop:nsx_role="nsx-manager nsx-controller" --prop:nsx_ip_0= --prop:nsx_netmask_0= --prop:nsx_gateway_0= --prop:nsx_dns1_0= --prop:nsx_ntp_0= --prop:nsx_isSSHEnabled=True --prop:nsx_allowSSHRootLogin=False --prop:nsx_passwd_0=VMware1!VMware1! --prop:nsx_cli_passwd_0=VMware1!VMware1! --prop:nsx_hostname=nsx-manager "C:\lab\nsx-unified-appliance-" vi://administrator@vsphere.local:VMware1!

Opening OVA source: C:\lab\nsx-unified-appliance-
The manifest does not validate
Opening VI target: vi://
Deploying to VI: vi://
Transfer Completed
Powering on VM: nsx-manager
Task Completed
Completed successfully

Global configuration files

Options on the command line can get quite long and hard to read as you can see. You can store them all in a global configuration file - one per user.

By default, global configuration files are stored %AppData%\VMware\ovftool.cfg

Keep in mind that when using a configuration file, there’s no need to include the -- before an option, and you DON’T use double quotes for values with spaces in. ie: prop:nsx_role=nsx-manager nsx-controller

Global Configuration

Local configuration files

Supposedly the same format as the Global Configuration file, but it reads this from the current directory. One thing to note is the documentation and command output say it looks for “.ovftool”, but in fact it tries to read “.option”.

Part of the hate relationship shows here where taking the Global configuration and putting it into the local configuration didn’t work for me. The configuration shows up in the command help, but I just can’t get it to deploy successfully.

Again you can test it with ovftool --help config.

Local Configuration

If you have more success, let me know.

There’s a bug using the .ovftool/.option file as a local configuration file. It’s been reported and hopefully will be fixed soon.

Failed to connect to server

If you’re unable to connect and get the following error below when prompted for the password:

Enter login information for target vi://
Username: administrator%40vsphere.local
Password: ************
Error: Internal error: Failed to connect to server

Or if you include the password on the command line you may get:

Error: Cannot parse locator: vi://administrator@vsphere.local:Password1$!
 - No manifest entry found for: 'nsx-unified-appliance-'.
 - File is missing from the manifest: 'nsx-unified-appliance-'.
Completed with errors

Check if you’re using a complex password with special characters, you may need to url encode them.

For the above example using Password1$!#, you’ll to make it Password1%24%21%23, even if you’re prompted for the password.

Check for a new version at

This was tested on version: VMware ovftool 4.3.0 (build-9264255)

Andrew Dauncey
Andrew Dauncey
Senior Consultant at VMware PSO

Every day I’m shuffling