ThoughtPolice VMware Images

Create and convert .ovf files with VMware

ESX 3.5 uses .ovf files when importing virtual machines. This is an open xml-based file format, and you can read more about OVF on the VMware website.

Setup ovftool

  1. You must have a working java install to run ovftool, and it must be in your path. To check:
    java -version
  2. Download ovftool
  3. Unpack it
    unzip -d ovftool VMware-ovftool-*zip
    cd ovftool
  4. Test run it to make sure it will work
    ./ovftool.sh
    If you get the error bad interpreter, then the file has Windows-style line endings. To fix it, run this:
    dos2unix ovftool.sh
    If you do not have dos2unix, run:
    cat ovftool.sh | tr -d "\r" > ovftool-FIXED.sh && mv ovftool-FIXED.sh ovftool.sh && chmod +x ovftool.sh
    and try again.

Use ovftool

  1. Make a directory to store the files
    mkdir /path/to/OVF
  2. To create an .ovf package from the command line, use:
    ./ovftool.sh /path/to/vmware/vmware.vmx /path/to/OVF
  3. If you prefer a gui, use:
    ./ovftool.sh -i

 

Comments? Feedback? e-mail me