Virtualization Company Logos Sun.com Intel.com AMD.com HP.com RedHat.com Apple.com SWSoft.com VMware.com Parallels.com Microsoft.com cj tracking image cj tracking image
OVF Revisited, 9 Months Later, Has Anything Changed?
May 22nd, 2008 under Open Source, Xen, x86 Virtualization, Sun, Microsoft, VMWare, News

In the fall 2007 x86Virtualization reported about VMware’s announcement of the creation of the “OVF: Open Virtual Machine Format“. What has happened since then? Where are things going? Why haven’t they moved yet?

This tool seems to be the only advancement since the annoucement of the format. There hasn’t been any other breakthroughs, there doesn’t seem to be any great uses for the format, other then ESX server, which supports to import and export VMs.

To learn more about the format read “Open Virtual Machine Format (OVF) -Virtual Machines - Virtualization - VMware” or Download the VMware PDF on OVF tool

VMWARE OPEN VIRTUAL MACHINE FORMAT TOOL, from VMware

What does this tool do? Why do you need it? and Does VMware include it in ESX?

What does the tool do?
The tool does the conversion between VMX (with VMDK) to OVF or the other way around.
Why do you need it?
This allows people who have OVF systems to convert to VMX for VMware player, server or fusion systems.
Does VMware include this functionality in ESX?
VMware includes a similar functionality in ESX 3.5, listed under their release notes:

Open Virtual Machine Format (OVF)—The Open Virtual Machine Format (OVF) is a virtual machine distribution format that supports sharing of virtual machines between products and organizations. VMware Infrastructure Client version 2.5 allows you to import and generate virtual machines in OVF format through the File > Virtual Appliance > Import/Export menu items. (source)

Running OVFTool for the first time

How to use OVFTool in Ubuntu is pretty simple. I have taken and duplicated the directions with some slight modifications from Create and convert .ovf files with VMware over at http://www.thoughtpolice.co.uk/

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

Get it from VMWARE OPEN VIRTUAL MACHINE FORMAT TOOL, from VMware

3. Unpack it

unzip -d ovftool VMware-ovftool-*zip
cd ovftool

4. Make the .sh file executable (copied from Infrageeks.com)

chmod +x ovftool.sh

5. Test run it to make sure it will work
the -i flag runs the interactive java gui, this is optional, but does make it much easier for the first few conversions.

sh ./ovftool.sh -i

Problem solving:
Possible Error: : not foundh: 5:
: not foundh: 8:
./ovftool.sh: 40: Syntax error: end of file unexpected (expecting “then”)

If you get the error bad interpreter, then the file has Windows-style line endings. To fix it, run this:

sudo apt-get install sysutils
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

Possible error: The JAVA_HOME environment variable is not defined correctly.
It must point to a Java 2 SE JRE or JDK installation version 5
or better

I recommend doing the following adjustment, first find the location of the java environment, then hardcode it into the script:
find / -iname "java"
nano ovftool.sh

now comment out the last if and hardcode in the location of the java bin, the resulting .sh should look similar to:

#if [ ! -x “$JAVA_HOME”/bin/java ]; then
# echo The JAVA_HOME environment variable is not defined correctly.
# echo It must point to a Java 2 SE JRE or JDK installation version 5
# echo or better
# exit 1
#fi

#$JAVA_HOME/bin/java -jar $OVFTOOL_JAR “$@”
/usr/bin/java -jar $OVFTOOL_JAR “$@”

Using OVF Tool, in interactive Mode to do a conversion

Run the file, from the command prompt with the -i flag set.
sh ./ovftool.sh -i
If everything goes right, you will be greeted by this window:
OVF Tool (experimental) Welcome Screen

Here is a screenshot of the preference window, showing why this experimental, notice the Path, not really a Linux location:

/home/bradmkjr/Desktop/ovftool-dir/C:\Program Files\VMware\VMware Workstation\vmware.exe

OVF Tool (experimental) Preference Screen

Convert a VMX to OVF

I downloaded a simple VMX from EasyVMX Super Simple Creator for the following demo.

1. Select your current VMX location, then choose next.
OVF Tool (experimental) Source Screen

2. Description preview, allow you to add more details to the description and attach a EULA file.
OVF Tool (experimental) Description Screen

3. Set you name and destination for the converted Virtual Machine.
OVF Tool (experimental) Description Screen

4. Complete, if everything works, you will be greeted with the following message.
OVF Tool (experimental) Complete Screen

Conversion from OVF to VMX

The conversion is the same process, so I decided to not include the screenshots. If you have any questions feel free to leave a comment and I will do my best to respond.

For instructions in Dutch on Vista check out VMware: (Open Virtual Machine Format) OVF Tool « ICT-Freak or this OVF Tool and Nostalgia » Yellow Bricks

Additional Sources of Information

VMware Communities: Does Import… support OVF standard? ..

Open Virtual Machine Format (Virtualization Blog)

Open Virtual Machine Format - Wikipedia, the free encyclopedia

virtualization.info: Virtualization leaders and OEMs start working on common virtual machines format

OVF White Paper Specification (PDF) provided by VMware

ovftool … | ShocKNetworK Blog


No related posts


2 Responses to “OVF Revisited, 9 Months Later, Has Anything Changed?”

  1. Arne FokkemaNo Gravatar Says:

    Nice posting but there is only one point of attention: my post dutch not in german ;-)

    keep up the great postings.

  2. Bradford KnowltonNo Gravatar Says:

    This is great, now I have my openID fixed and the Gravatars, problem due to old template!!

Leave a Reply