Converting VMX to an OVA

VMware has VMX format which works for VMware products. The other commonly found format which is OVF, as this is a open standard (OVA is OVF but compressed into a single file). There are times where converting between the two formats is required.

In order to convert from VMware’s VMX to a OVA file, we will use ovftool. If you already have either VMware workstation or VMware fusion pre-installed, you may already have it (else it can be downloaded as a standalone program for free). Its default locations are:

  • Linux: /usr/bin/ovftool
  • OS X/macOS: /Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool/ovftool
  • Windows: C:\Program Files (x86)\VMware\VMware Workstation\OVFTool\ovftool.exe

We will be using the official Kali Linux VMware image to convert. To start with unzip it to get access to the vmx within.

[email protected]:~$ 7z x kali-linux-2022.3-vmware-amd64.7z
[...]
[email protected]:~$
[email protected]:~$ ls kali-linux-*-vmware-amd64.vmwarevm/*vmx
kali-linux-2022.3-vmware-amd64.vmwarevm/kali-linux-2022.3-vmware-amd64.vmx
[email protected]:~$

We can now start to convert by doing the following.

[email protected]:~$ ovftool kali-linux-*-vmware-amd64.vmwarevm/*vmx kali-linux-rolling-amd64.ova
Opening VMX source: kali-linux-2022.3-vmware-amd64.vmwarevm/kali-linux-2022.3-vmware-amd64.vmx
Opening OVA target: kali-linux-rolling-amd64.ova
Writing OVA package: kali-linux-rolling-amd64.ova
[...]
Transfer Completed
Completed successfully
[email protected]:~$
[email protected]:~$ file kali-linux-rolloing.ova
kali-linux-rolloing.ova: POSIX tar archive
[email protected]:~$ ls -lah kali-linux-rolloing.ova
-rw-r--r-- 1 kali kali 3.4G Nov 10 23:18 kali-linux-rolloing.ova
[email protected]:~$

That’s it!

The OVA file can be now move and used where needed such as to ESXi (if the in-built upload feature is not working) or migrate to VirtualBox (You may need to install Guest Addition if so).


Updated on: 2022-Aug-10
Author: gamb1t