Before download & install, you must prepare:
1. Account of MyVMware for login, because you have to download this SW from MyVMware.
2. Check your vSphere version. Specific ovftool version is responded to the specific vSphere version. For example: ovftool v4.2.0 is sutible to vSphere 6.0, otherwise, if you run ovftools 3.5.0 on vSphere 6.0, there will be error msg like: Segmentation fault. Detail of ovftool and vSphere version mapping, you can check the release note.
The install step and the export usage:
1. When you are ready to install, Please download 64-bit for linux and run the shell script as ./VMware-ovftool-4.2.0-*-lin.x86_64.bundle. You have to agree the license declaime and press Enter, then the install complete.
2. After install, you must use SCP or other remote copy way to copy /usr/lib/vmware-ovftool from local to your esxi server. The syntax is: scp -r /usr/lib/vmware-ovftool/ <esxi_login_account>@<esxi_server_ip>:<the path you want to save the ovftool>. It would be like:
scp -r /usr/lib/vmware-ovftool/ root@192.168.201.82:/vmfs/volumes/datastore1
3. When SCP complete, login to your esxi server and go to the path:/vmfs/volumes/datastore1/vmware-ovftool and vi ovftool. Replace the first line #!/bin/bash to #!/bin/sh because there is no bash shell in esxi server.
4. The export syntax is: <ovftool full path>/ovftool "vi://<local_login_account>:<local_login_password>@<host>/<VM>/" <ovf_full_path>/<ovf_file_name>.ovf, and take myself for example:
/vmfs/volumes/datastore1/vmware-ovftool/ovftool "vi://root:p@ssw0rd@loca
lhost/stella-2008R2/" /vmfs/volumes/datastore2/stella-2008R2.ovf
Note: The path must be full path, or you will hit the "SSLLoadSharedLibraries: Failed to load OpenSSL libraries" issue.
Reference:
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1038709
http://www.virtuallyghetto.com/2012/05/how-to-deploy-ovfova-in-esxi-shell.html