VMware Communities
ben_marko
Contributor
Contributor

Using OVF Tool on a Mac...?

I have downloaded and installed OVF Tool for Mac, and the documentation doesn't have any help for Mac users. I tried to run some simple commands but nothing I do seems to work. I just need to be able to run OVF Tool to convert a Fusion 7 VM into an .ovf format I can then import into vSphere 5.5. Anyone know of a guide that could walk me through the Terminal commands required to do this?

9 Replies
WoodyZ
Immortal
Immortal

The VMware OVF Tool is already installed and a part of VMware Fusion 7 and you do not need to download and install it! Smiley Wink

Executing in a Terminal ovftool --help outputs the internal help file.

It's located at: "/Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool/ovftool"

0 Kudos
ben_marko
Contributor
Contributor

I tried that command:

ovftool --help

and it says:

-bash ovftool: command not found

When I try to run the tool from within Terminal, it says:

Error: No source or target specified. Try 'ovftool --help' for more options.

Completed with errors

So I am back to square one.

0 Kudos
WoodyZ
Immortal
Immortal

Under (Mac) OS X the ovftool is a command line utility that is used from a Terminal and it appears that you do not know or understand the most rudimentary basics of computing from the command line.

If a command is not in the path [$PATH] or the present working directory [$PWD] then one must use the Fully Qualified Pathname (FQP) to execute it.

As an example in a Terminal, by default, the present working directory [$PWD] when the Terminal is first opened is typically one's Home Directory.  Also called one's Home Folder when referenced from a Graphic User Interface (GUI).

So in the Terminal type echo $PATH and press Enter and the output will be e.g.: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:

Being that the $PWD is /Users/$USER and ovftool is not located there or in the $PATH one would then need to use the FQP or change directory [cd] to its location.

Example 1: "/Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool/ovftool"

Example 2: /Applications/VMware\ Fusion.app/Contents/Library/VMware\ OVF\ Tool/ovftool

The difference between them is quoted vs. escaped in that the FQP command containing spaces must either be quoted or the spaces escaped with the backslash character.

So to output the internal help file one can do any of the following:

"/Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool/ovftool" --help

/Applications/VMware\ Fusion.app/Contents/Library/VMware\ OVF\ Tool/ovftool --help

Or...

cd "/Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool"

./ovftool --help

Note that in the example above ovftool is preceded by ./ and this is necessary when the executable is in the $PWD and is not in the $PATH.

At the bottom of the output note that it states:

For more help, type: --help, where topics are:

locators    : For detailed source and destination locator syntax

examples    : For examples of use

config      : For syntax of configuration files

integration : For a list of options primarily used when ovftool is exec'ed

               from another tool or shellscript.

So, assuming the $PWD is the directory ovftool is located, then for examples one would type: ./ovftool --help examples

ben_marko
Contributor
Contributor

Wow...thanks for the solution (I'll try it later), and thanks for the opener. It isn't often I get such a rude response. Sorry for not being as experienced as Your Almightyness.

AvariOfEnnor
Contributor
Contributor

I agree his response was a bit rude; however it did solve my problem too.

I'm going to mention what my lack of understanding was in this scenario in case it helps others.

The fact that I can't navigate to that directory in the GUI. When I would google how to find the ovftool everything kept pointing me to a directory path I couldn't navigate to in the Mac os gui. I didn't know how to view the contents of the application file. After some googling I now know that you can right click a .app file and choose "view package contents" which will allow you to navigate through the folder.

juarezjx
Contributor
Contributor

What a jerk!  The destination of ovftool was not initially under Applications in finder.  You can be kinder

Andydel
VMware Employee
VMware Employee

Just to have this in the thread, if you using the latest version of OSX, you will want to update this file.

.zshrc

Just add this to the file.

export PATH="$PATH:/Applications/VMware\ OVF\ Tool/"

Then do this command to get the command working

source .zshrc

Then test ovftools is working

ovftools --version

0 Kudos
Technogeezer
Immortal
Immortal

I believe this to be wrong. On a stock VMware Fusion installation, the tool is not installed directly in /Applications. It is in the Fusion application bundle.

The proper $PATH addition to .zshrc should be:

export PATH="$PATH:/Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool/"

 

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
Andydel
VMware Employee
VMware Employee

If you install the OVFtool directly, this is correct; if you have fusion, that is correct too.

0 Kudos