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
VMware vSphere 9.0
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
"C:\Program Files\VMware\VMware OVF Tool") ovftool.exe --noSSLVerify vi://Host_IP/VM_name "D:\Exported_VM.ova"ovftool.exe --noSSLVerify "vi://[email protected]/Datacenter/vm/VM Folder/VM_Name" "D:\Exported_VM.ova"ovftool.exe --noSSLVerify --name=VM_Name --datastore=Datastore_name --diskMode=Disk_mode_options --network="PortGroup" C:\Package.ova vi://[email protected]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.comNote:
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 Command-Line Options.
Exporting directly from ESXi can bypass vCenter management session timeouts