This article provides sample syntax to export and import packages in ESXi and vCenter Server using the OVF Tool
VMware vSphere 6.x
VMware vSphere 7.x
VMware vSphere 8.x
Exporting OVF templates enables the creation of virtual appliances for future import by users, while deploying OVF or OVA templates allows the addition of pre-configured virtual machines to the vCenter Server or ESXi inventory.
Install and access OVF Tool
Download ovftool from the Broadcom Developers Portal.
Open Windows command prompt with administrator privileges
Navigate to the directory where ovftool is installed (Default location: "C:\Program Files\VMware\VMware OVF Tool")
Export using OVFTool
Export from ESXi:
ovftool.exe --noSSLVerify vi://Host_IP/VM_name "D:\Exported_VM.ova"
Export from vCenter:
ovftool.exe --noSSLVerify "vi://[email protected]/Datacenter/vm/VM Folder/VM_Name" "D:\Exported_VM.ova"
Deploy using OVFTool
Deploy ova/ovf templates to ESXi:
ovftool.exe --noSSLVerify --name=VM_Name --datastore=Datastore_name --diskMode=Disk_mode_options --network="PortGroup" C:\Package.ova vi://[email protected]
Deploy ova/ovf templates to vCenter:
ovftool.exe --noSSLVerify --name=VM_Name --datastore=Datastore_name --diskMode=Disk_mode_options --network="PortGroup" C:\Package.ova vi://[email protected]/Datacenter_name/host/Cluster_name/esxi.example.org
Note:
In the above example, the string "host" remains constant and is not to be modified. The host where the template needs to be deployed at is updated at the end.
A list of available flags usable with the OVF tool can be found in the User's Guide.