VMware OVF Tool is a command-line utility that allows you to import and export OVF packages to and from a wide variety of VMware platform products
To convert a virtual machine in VMware runtime format (.vmx) to an OVF package
> ovftool /vms/my_vm.vmx /ovfs/my_vapp.ovf
The result is located in /ovfs/my_vapp.[ovf|vmdk]