Open a Windows command prompt with administrator privileges (cmd.exe)
Navigate to the directory where you installed ovftool (default location: cd “<C:\Program Files\VMware\VMware> OVF Tool”)
Using the OVF Tool to export
Use the following command to export to OVF: ovftool.exe –noSSLVerify vi://ip_of_esxi_host where the machine resides/name of source_machine “D:\ovf_export_name.ovf”
Using the OVF Tool deploy
Use the following command to deploy a OVF: ovftool -ds=DestinationDatastore -n=DestinationVMNameOVF.ovf vi://username:password@vCenter2/Datacenter2/host/Cluster2
Using OVF Tool 1-step to export and deploy
Use the following command to export and deploy a OVF: ovftool.exe --X:logLevel=trivia --X:logToConsole --datastore=datastorename "<path file of ovf>" "vi://administrator:Password@<vc fqdn ip or vc>Datacenter/host/Cluster/<Host IP or FQDN>"
Notes:
--X:logLevel=trivia --X:logToConsole: These flags enable trivia logging and output to command prompt which assists with troubleshooting.
Some additional flags may be required in order to successfully export or deploy: